mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #693 from dorianj/tsmf_volume
tsmf: add ability for tsmf audio players to get volume change
This commit is contained in:
commit
cc590eee8f
|
@ -34,6 +34,8 @@ struct _ITSMFAudioDevice
|
|||
boolean (*Play) (ITSMFAudioDevice* audio, uint8* data, uint32 data_size);
|
||||
/* Get the latency of the last written sample, in 100ns */
|
||||
uint64 (*GetLatency) (ITSMFAudioDevice* audio);
|
||||
/* Change the playback volume level */
|
||||
void (*ChangeVolume) (ITSMFAudioDevice* audio, uint32 newVolume, uint32 muted);
|
||||
/* Flush queued audio data */
|
||||
void (*Flush) (ITSMFAudioDevice* audio);
|
||||
/* Free the audio device */
|
||||
|
|
|
@ -736,13 +736,14 @@ static void tsmf_stream_change_volume(TSMF_STREAM* stream, uint32 newVolume, uin
|
|||
if (!stream)
|
||||
return;
|
||||
|
||||
if (!stream->decoder)
|
||||
return;
|
||||
|
||||
if (stream->decoder->ChangeVolume)
|
||||
if (stream->decoder != NULL && stream->decoder->ChangeVolume)
|
||||
{
|
||||
stream->decoder->ChangeVolume(stream->decoder, newVolume, muted);
|
||||
}
|
||||
else if (stream->audio != NULL && stream->audio->ChangeVolume)
|
||||
{
|
||||
stream->audio->ChangeVolume(stream->audio, newVolume, muted);
|
||||
}
|
||||
}
|
||||
|
||||
void tsmf_presentation_volume_changed(TSMF_PRESENTATION* presentation, uint32 newVolume, uint32 muted)
|
||||
|
|
Loading…
Reference in New Issue