mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Adjustments to user handling of Stereo
Per VC discussion:
- Pressing STOP does not NULL your selected song
- ...unless you press it a second time while already stopped
- Pressing PLAY should de-activate pause if active, not restart the track
- Pressing PAUSE while paused should not de-activate pause
- Removed the Extra functionality from TRACK.
This commit is contained in:
parent
bc07cfa94b
commit
53fc4aec0a
2 changed files with 45 additions and 47 deletions
|
|
@ -11,13 +11,7 @@ static void M_SoundTestMainControl(INT32 choice)
|
||||||
// Sound test exception
|
// Sound test exception
|
||||||
if (soundtest.current == NULL || soundtest.current->numtracks == 0)
|
if (soundtest.current == NULL || soundtest.current->numtracks == 0)
|
||||||
{
|
{
|
||||||
if (currentMenu->menuitems[itemOn].mvar1 == 1) // Play
|
if (cv_soundtest.value != 0)
|
||||||
{
|
|
||||||
soundtest.playing = true;
|
|
||||||
//soundtest.sequence = true;
|
|
||||||
S_UpdateSoundTestDef(false, false, false);
|
|
||||||
}
|
|
||||||
else if (cv_soundtest.value != 0)
|
|
||||||
{
|
{
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
|
||||||
|
|
@ -25,6 +19,16 @@ static void M_SoundTestMainControl(INT32 choice)
|
||||||
{
|
{
|
||||||
CV_SetValue(&cv_soundtest, 0);
|
CV_SetValue(&cv_soundtest, 0);
|
||||||
}
|
}
|
||||||
|
else if (currentMenu->menuitems[itemOn].mvar1 == 1) // Play
|
||||||
|
{
|
||||||
|
S_StartSound(NULL, cv_soundtest.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (currentMenu->menuitems[itemOn].mvar1 == 1) // Play
|
||||||
|
{
|
||||||
|
soundtest.playing = true;
|
||||||
|
//soundtest.sequence = true;
|
||||||
|
S_UpdateSoundTestDef(false, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -32,19 +36,34 @@ static void M_SoundTestMainControl(INT32 choice)
|
||||||
|
|
||||||
if (currentMenu->menuitems[itemOn].mvar1 == 1) // Play
|
if (currentMenu->menuitems[itemOn].mvar1 == 1) // Play
|
||||||
{
|
{
|
||||||
S_SoundTestPlay();
|
if (soundtest.paused == true)
|
||||||
}
|
|
||||||
else if (soundtest.playing == true)
|
|
||||||
{
|
|
||||||
if (currentMenu->menuitems[itemOn].mvar1 == 2)
|
|
||||||
{
|
{
|
||||||
S_SoundTestTogglePause();
|
S_SoundTestTogglePause();
|
||||||
}
|
}
|
||||||
else
|
else if (soundtest.playing == false)
|
||||||
|
{
|
||||||
|
S_SoundTestPlay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (soundtest.playing == true)
|
||||||
|
{
|
||||||
|
if (currentMenu->menuitems[itemOn].mvar1 == 2) // Pause
|
||||||
|
{
|
||||||
|
if (soundtest.paused == false)
|
||||||
|
{
|
||||||
|
S_SoundTestTogglePause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // Stop
|
||||||
{
|
{
|
||||||
S_SoundTestStop();
|
S_SoundTestStop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (currentMenu->menuitems[itemOn].mvar1 == 0) // Stop while stopped?
|
||||||
|
{
|
||||||
|
soundtest.current = NULL;
|
||||||
|
soundtest.currenttrack = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void M_SoundTestNextPrev(INT32 choice)
|
static void M_SoundTestNextPrev(INT32 choice)
|
||||||
|
|
@ -58,53 +77,34 @@ static void M_SoundTestTrack(INT32 choice)
|
||||||
{
|
{
|
||||||
const UINT8 numtracks = (soundtest.current != NULL) ? soundtest.current->numtracks : 0;
|
const UINT8 numtracks = (soundtest.current != NULL) ? soundtest.current->numtracks : 0;
|
||||||
|
|
||||||
if (numtracks == 1)
|
if (numtracks == 1 // No cycling
|
||||||
|
|| choice == -1) // Extra
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Confirm is generally treated as Up.
|
||||||
|
|
||||||
// Soundtest exception
|
// Soundtest exception
|
||||||
if (numtracks == 0)
|
if (numtracks == 0)
|
||||||
{
|
{
|
||||||
S_StopSounds();
|
S_StopSounds();
|
||||||
|
CV_AddValue(&cv_soundtest, ((choice == 0) ? -1 : 1));
|
||||||
if (choice == -1) // Extra
|
|
||||||
{
|
|
||||||
if (cv_soundtest.value != 0)
|
|
||||||
CV_SetValue(&cv_soundtest, 0);
|
|
||||||
}
|
|
||||||
else if (choice == 2) // Confirm
|
|
||||||
{
|
|
||||||
if (cv_soundtest.value != 0)
|
|
||||||
S_StartSound(NULL, cv_soundtest.value);
|
|
||||||
}
|
|
||||||
else // Up or Down
|
|
||||||
{
|
|
||||||
CV_AddValue(&cv_soundtest, ((choice == 0) ? -1 : 1));
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (choice == -1) // Extra
|
if (choice == 0) // Down
|
||||||
{
|
{
|
||||||
soundtest.currenttrack = 0;
|
soundtest.currenttrack--;
|
||||||
|
if (soundtest.currenttrack < 0)
|
||||||
|
soundtest.currenttrack = numtracks-1;
|
||||||
}
|
}
|
||||||
else
|
else //if (choice == 1) -- Up
|
||||||
{
|
{
|
||||||
// Confirm resets the current instance
|
soundtest.currenttrack++;
|
||||||
if (choice == 0) // Down
|
if (soundtest.currenttrack >= numtracks)
|
||||||
{
|
soundtest.currenttrack = 0;
|
||||||
soundtest.currenttrack--;
|
|
||||||
if (soundtest.currenttrack < 0)
|
|
||||||
soundtest.currenttrack = numtracks-1;
|
|
||||||
}
|
|
||||||
else if (choice == 1) // Up
|
|
||||||
{
|
|
||||||
soundtest.currenttrack++;
|
|
||||||
if (soundtest.currenttrack >= numtracks)
|
|
||||||
soundtest.currenttrack = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (soundtest.playing)
|
if (soundtest.playing)
|
||||||
|
|
|
||||||
|
|
@ -1628,8 +1628,6 @@ void S_SoundTestStop(void)
|
||||||
|
|
||||||
soundtest.playing = false;
|
soundtest.playing = false;
|
||||||
soundtest.paused = false;
|
soundtest.paused = false;
|
||||||
soundtest.current = NULL;
|
|
||||||
soundtest.currenttrack = 0;
|
|
||||||
|
|
||||||
S_AttemptToRestoreMusic();
|
S_AttemptToRestoreMusic();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue