}
_butler.reset (new Butler (_player, _film->log(), map, _audio_channels));
- if (!Config::instance()->sound()) {
+ if (!Config::instance()->sound() && !_audio.isStreamOpen()) {
_butler->disable_audio ();
}
return;
}
- if ((time() - video.second) > one_video_frame()) {
+ if (_playing && (time() - video.second) > one_video_frame()) {
/* Too late; just drop this frame before we try to get its image (which will be the time-consuming
part if this frame is J2K).
*/
_audio_channels = _audio.getDeviceInfo(st).outputChannels;
- recreate_butler ();
-
RtAudio::StreamParameters sp;
sp.deviceId = st;
sp.nChannels = _audio_channels;
wxString::Format (_("Could not set up audio output (%s). There will be no audio during the preview."), e.what())
);
}
+ recreate_butler ();
} else {
_audio_channels = 0;