diff --git a/CHANGELOG b/CHANGELOG index c0b91baff..59099e317 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -832,6 +832,12 @@ API Changes Fixes ----- +- A lone .m2v played with --framefile now finds the .ogg beside it, as a + framefile's segments always have. A Daphne era elementary stream + carries no audio of its own, so lair.m2v played silently unless it was + listed in a framefile or --altaudio was given. Any other container + keeps using the audio inside it. + - A single-frame image saved as a 1-bit PNG (many overlay assets from the 2.x era) loads again; spriteLoad reported "Blit combination not supported" on it. Images with 16 bits per channel or floating point diff --git a/src/singe.c b/src/singe.c index 26ca73dc6..72ada9a9d 100644 --- a/src/singe.c +++ b/src/singe.c @@ -14412,6 +14412,7 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, SDL_GPUDevice *device, Co SDL_Event event; ManyMouseEvent mouseEvent; MouseT *mouse = NULL; + char *audioFile = NULL; int32_t finished[SOUND_QUEUE_SIZE]; int32_t finishedCount = 0; @@ -14464,7 +14465,12 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, SDL_GPUDevice *device, Co _global.frameFileHandle = frameFileLoad(_global.conf->videoFile, _global.conf->dataDir, _global.renderer, _global.conf->showCalculated); frameFileSeek(_global.frameFileHandle, 0, &_global.videoHandle, &thisFrame); // Fills in _global.videoHandle } else { - _global.videoHandle = videoLoad(_global.conf->videoFile, NULL, _global.conf->dataDir, _global.renderer, false); + // A lone .m2v is a Daphne era elementary stream with no audio of its own; its sound is + // the .ogg beside it, which is the same sidecar a framefile's segments look for. Any + // other container keeps the audio inside it, and frameFileAudioName answers NULL. + audioFile = frameFileAudioName(_global.conf->videoFile, _startAudioSuffix()); + _global.videoHandle = videoLoad(_global.conf->videoFile, audioFile, _global.conf->dataDir, _global.renderer, false); + free(audioFile); } videoSetVolume(_global.videoHandle, _global.conf->volumeVldp, _global.conf->volumeVldp); _global.canvasWidth = videoGetWidth(_global.videoHandle);