'How to disable default console logs from AudioEngine QML type
I have used AudioEngine qml type to play some audio files in infinite loop and changing the pitch of audio based on some values using SoundInstance. Every time default console logs are printing continuously. Please help me to find the way to stop/disable console logs from AudioEngine qml type.
Please find some default logs below:
default openal device = OpenAL Soft device list: OpenAL Soft
add QDeclarativeAudioSample[ "Tone" ]
add QDeclarativeAudioCategory[ "Volume" ]
add QDeclarativeSound[ "abc" ]
SoundCone: engine not changeable after initialization.
QDeclarativeSoundInstance::ctor()
QDeclarativeSoundInstance::setSound( "abc" )
Unknown child type for AudioEngine!
QDeclarativeSoundInstance::setEngine( QDeclarativeAudioEngine(0x5621e8471aa0) )
AudioEngine begin initialization
creating default category
init samples 1
creating new StaticSoundBufferOpenAL
init sounds 1
AudioEngine ready.
QDeclarativeSoundInstance::engineComplete()
QDeclarativeSoundInstance::setSound( "abc" )
SoundInstance switch sound from [ "" ] to [ "abc" ]
QDeclarativeSoundInstance::stop()
creating new QSoundInstance
QSoundInstance::bindSoundDescription QDeclarativeSound(0x7f4e90217970)
QAudioEnginePrivate::createSoundSource()
creating new QSoundSourcePrivate
QSoundInstance::prepareNewVariation()
QSoundInstance: generate new play variation [old: -1 , new: 0 - "spo2Tone" ]
QSoundInstance::updateVariationParameters 1 1 false
QDeclarativeAudioCategory[ "Volume" ] setVolume( 0.8 )
StaticSoundBufferOpenAL:sample[ QUrl("qrc:/Audio/xyz.wav") ] loaded
QSoundInstance::bufferReady()
QDeclarativeSoundInstance::stop()
QSoundInstancePrivate::play()
QSoundInstance::prepareNewVariation() QDeclarativeSoundInstance::play() ........
Please find below my sample code:
AudioEngine {
id: audioengine
AudioSample {
name: "Tone"
source: "qrc:/Audio/abc.wav"
}
AudioCategory {
name: "Volume"
volume: 100
}
Sound {
name: "abc"
playType: Sound.Random
category: "Volume"
PlayVariation {
sample:"Tone"
}
}
SoundInstance {
id: soundEffect
engine: audioengine
sound: "abc"
}
}
Connections {
target: viewModel
function onSignalEmited() {
if(viewModel.xyz)
{
soundEffect.play();
}
else {
soundEffect.stop();
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|