Skip to content

Commit

Permalink
Audio: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 14, 2012
1 parent 76a6b52 commit 0e682bc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
10 changes: 5 additions & 5 deletions doomsday/engine/portable/src/audiodriver_music.c
Expand Up @@ -30,11 +30,6 @@

static boolean needBufFileSwitch = false;

void AudioDriver_Music_SwitchBufferFilenames(void)
{
needBufFileSwitch = true;
}

static AutoStr* composeBufferedMusicFilename(int id, const char* ext)
{
if(ext && ext[0])
Expand Down Expand Up @@ -141,6 +136,11 @@ static boolean musicIsPlaying(audiointerface_music_t* iMusic)
return iMusic->gen.Get(MUSIP_PLAYING, 0);
}

void AudioDriver_Music_SwitchBufferFilenames(void)
{
needBufFileSwitch = true;
}

AutoStr* AudioDriver_Music_ComposeTempBufferFilename(const char* ext)
{
static int currentBufFile = 0;
Expand Down
24 changes: 12 additions & 12 deletions doomsday/engine/portable/src/s_mus.c
Expand Up @@ -49,22 +49,22 @@ static boolean musAvail = false;
static boolean musicPaused = false;
static int currentSong = -1;

void Mus_Register(void)
static int getInterfaces(audiointerface_music_generic_t** ifs)
{
// Cvars
C_VAR_INT("music-volume", &musVolume, 0, 0, 255);
C_VAR_INT("music-source", &musPreference, 0, 0, 2);
C_VAR_CHARPTR2("music-soundfont", &soundFontPath, 0, 0, 0, Mus_UpdateSoundFont);

// Ccmds
C_CMD_FLAGS("playmusic", NULL, PlayMusic, CMDF_NO_DEDICATED);
C_CMD_FLAGS("pausemusic", NULL, PauseMusic, CMDF_NO_DEDICATED);
C_CMD_FLAGS("stopmusic", "", StopMusic, CMDF_NO_DEDICATED);
return AudioDriver_FindInterfaces(AUDIO_IMUSIC_OR_ICD, (void**) ifs);
}

static int getInterfaces(audiointerface_music_generic_t** ifs)
void Mus_Register(void)
{
return AudioDriver_FindInterfaces(AUDIO_IMUSIC_OR_ICD, (void**) ifs);
// Variables:
C_VAR_INT ("music-volume", &musVolume, 0, 0, 255);
C_VAR_INT ("music-source", &musPreference, 0, 0, 2);
C_VAR_CHARPTR2("music-soundfont", &soundFontPath, 0, 0, 0, Mus_UpdateSoundFont);

// Commands:
C_CMD_FLAGS ("playmusic", NULL, PlayMusic, CMDF_NO_DEDICATED);
C_CMD_FLAGS ("pausemusic", NULL, PauseMusic, CMDF_NO_DEDICATED);
C_CMD_FLAGS ("stopmusic", "", StopMusic, CMDF_NO_DEDICATED);
}

/**
Expand Down

0 comments on commit 0e682bc

Please sign in to comment.