Skip to content

Commit

Permalink
FF7: Fix overlapping external music tracks when external_music_resume…
Browse files Browse the repository at this point in the history
… = false
  • Loading branch information
julianxhokaxhiu committed Oct 1, 2023
1 parent 8200d1d commit 1c1438f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Lighting: Fix field shadows not displaying during FMV movies
- Lighting: Implemented GPU-based original game lighting that better matches PSX version
- Lighting: Fixed minor shadow visual glitches occurring in some fields
- Music: Fix overlapping external music tracks when `external_music_resume = false`
- Renderer: Fix black color in some field maps (`spipe2` for example) ( https://github.com/julianxhokaxhiu/FFNx/pull/587 )
- Voice: Enable tutorial voice acting
- Widescreen: Added experimental support for 16:10 aspect ratio
Expand Down
4 changes: 2 additions & 2 deletions src/music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ bool play_music(const char* music_name, uint32_t music_id, int channel, NxAudioE

void ff7_play_midi(uint32_t music_id)
{
const int channel = next_music_channel;
const int channel = external_music_resume ? next_music_channel : 0;

if (nxAudioEngine.currentMusicId(0) != music_id && nxAudioEngine.currentMusicId(1) != music_id)
{
Expand Down Expand Up @@ -417,7 +417,7 @@ void stop_music()
void ff7_cross_fade_midi(uint32_t music_id, uint32_t steps)
{
const char* midi_name = common_externals.get_midi_name(music_id);
const int channel = next_music_channel;
const int channel = external_music_resume ? next_music_channel : 0;

/* FIXME: the game uses cross_fade_midi only in two places,
* with steps = 4 everytime. In the PS version, theses transitions
Expand Down

0 comments on commit 1c1438f

Please sign in to comment.