Fixes #4996: Fix metadata when exporting multiple tracks (#5005)

Co-Authored-By: Hyunjin Song <tteu.ingog@gmail.com>
This commit is contained in:
Johannes Lorenz
2019-06-07 18:28:11 +02:00
committed by GitHub
parent d194c70391
commit 6e5650c50a
2 changed files with 29 additions and 21 deletions

View File

@@ -575,21 +575,35 @@ void Mixer::changeQuality( const struct qualitySettings & _qs )
void Mixer::setAudioDevice( AudioDevice * _dev,
bool startNow )
void Mixer::doSetAudioDevice( AudioDevice * _dev )
{
stopProcessing();
// TODO: Use shared_ptr here in the future.
// Currently, this is safe, because this is only called by
// ProjectRenderer, and after ProjectRenderer calls this function,
// it does not access the old device anymore.
if( m_audioDev != m_oldAudioDev ) {delete m_audioDev;}
if( _dev == NULL )
if( _dev )
{
m_audioDev = _dev;
}
else
{
printf( "param _dev == NULL in Mixer::setAudioDevice(...). "
"Trying any working audio-device\n" );
m_audioDev = tryAudioDevices();
}
else
{
m_audioDev = _dev;
}
}
void Mixer::setAudioDevice( AudioDevice * _dev,
bool startNow )
{
stopProcessing();
doSetAudioDevice( _dev );
emit sampleRateChanged();
@@ -599,26 +613,16 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
void Mixer::setAudioDevice( AudioDevice * _dev,
void Mixer::setAudioDevice(AudioDevice * _dev,
const struct qualitySettings & _qs,
bool _needs_fifo,
bool startNow )
bool startNow)
{
// don't delete the audio-device
stopProcessing();
m_qualitySettings = _qs;
if( _dev == NULL )
{
printf( "param _dev == NULL in Mixer::setAudioDevice(...). "
"Trying any working audio-device\n" );
m_audioDev = tryAudioDevices();
}
else
{
m_audioDev = _dev;
}
doSetAudioDevice( _dev );
emit qualitySettingsChanged();
emit sampleRateChanged();