mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Stop Ffmpeg::AudioService in Ffmpeg::~AudioPlayer()
When the current audio player instance changes, the destroyed player's playback must be stopped for consistency between implementations and to avoid surprises. Note that this residual playback could be stopped only by switching back to the Ffmpeg player or by exiting the application.
This commit is contained in:
parent
b34ac9630e
commit
fb71eb4ce1
|
@ -22,6 +22,11 @@ public:
|
|||
this, SIGNAL( error( QString ) ) );
|
||||
}
|
||||
|
||||
~AudioPlayer()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
virtual QString play( const char * data, int size )
|
||||
{
|
||||
AudioService::instance().playMemory( data, size );
|
||||
|
|
Loading…
Reference in a new issue