Expose the audio category information for streams.
QAudioOutput and QSoundEffect now have a category property so that system volume mixing or processing can be applied. Initially just pulseaudio supports this but Windows Vista etc should also work. Change-Id: I6855b08367e5a055ac7dfcffd644c98bfd7c5a4e Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
8441d2e32e
commit
5f7b64346d
@@ -363,6 +363,41 @@ qreal QAudioOutput::volume() const
|
||||
return d->volume();
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the audio category of this audio stream.
|
||||
|
||||
Some platforms can group audio streams into categories
|
||||
and manage their volumes independently, or display them
|
||||
in a system mixer control. You can set this property to
|
||||
allow the platform to distinguish the purpose of your streams.
|
||||
|
||||
\sa setCategory()
|
||||
*/
|
||||
QString QAudioOutput::category() const
|
||||
{
|
||||
return d->category();
|
||||
}
|
||||
|
||||
/*!
|
||||
Sets the audio category of this audio stream.
|
||||
|
||||
Some platforms can group audio streams into categories
|
||||
and manage their volumes independently, or display them
|
||||
in a system mixer control. You can set this property to
|
||||
allow the platform to distinguish the purpose of your streams.
|
||||
|
||||
Not all platforms support audio stream categorization. In this
|
||||
case, the function call will be ignored.
|
||||
|
||||
Changing an audio output stream's category while it is opened
|
||||
will not take effect until it is reopened.
|
||||
\sa category()
|
||||
*/
|
||||
void QAudioOutput::setCategory(const QString &category)
|
||||
{
|
||||
d->setCategory(category);
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn QAudioOutput::stateChanged(QAudio::State state)
|
||||
This signal is emitted when the device \a state has changed.
|
||||
|
||||
Reference in New Issue
Block a user