This commit is contained in:
@@ -66,6 +66,12 @@ public:
|
||||
// for tests; the real lookup is through getPlaybackDevices().
|
||||
static std::string resolvePlaybackDeviceName(SDL_AudioDeviceID id);
|
||||
|
||||
// Builds the SDL_PropertiesID passed to MIX_PlayTrack() for tracks that
|
||||
// loop forever (MIX_PROP_PLAY_LOOPS_NUMBER = -1). Exposed for tests; no
|
||||
// mixer, track, or audio device is required. The caller owns the property
|
||||
// set and must release it with SDL_DestroyProperties().
|
||||
static SDL_PropertiesID createInfiniteLoopOptions();
|
||||
|
||||
// Playback control
|
||||
bool playTrack(const std::string& wav_filename);
|
||||
void stopTrack();
|
||||
@@ -97,6 +103,11 @@ private:
|
||||
void startFadeIn(int slotIndex, float seconds);
|
||||
std::string displayNameFor(const std::string& wav_filename) const;
|
||||
|
||||
// Starts the track on the given slot with infinite looping. The track must
|
||||
// already be loaded on the slot. Calling this on a playing/stopped/fading
|
||||
// track restarts it (cancelling any in-flight stop-fade).
|
||||
bool playTrackLooping(int slotIndex);
|
||||
|
||||
// Recreates the mixer on the given playback device id (0 = system default).
|
||||
// Called with mutex_ held. Preserves playback state: whichever track was
|
||||
// playing on the active slot is reloaded and resumed at full gain, an
|
||||
|
||||
Reference in New Issue
Block a user