Mercurial > hg > svcore
diff base/AudioPlaySource.h @ 1040:a1cd5abcb38b cxx11
Introduce and use a samplerate type
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 12:01:04 +0000 |
parents | 6a94bb528e9d |
children | ca43c4b7719c |
line wrap: on
line diff
--- a/base/AudioPlaySource.h Tue Mar 03 17:09:19 2015 +0000 +++ b/base/AudioPlaySource.h Wed Mar 04 12:01:04 2015 +0000 @@ -16,6 +16,8 @@ #ifndef _AUDIO_PLAY_SOURCE_H_ #define _AUDIO_PLAY_SOURCE_H_ +#include "BaseTypes.h" + struct Auditionable { virtual ~Auditionable() { } }; @@ -37,7 +39,7 @@ * Start playing from the given frame. If playback is already * under way, reseek to the given frame and continue. */ - virtual void play(int startFrame) = 0; + virtual void play(sv_frame_t startFrame) = 0; /** * Stop playback. @@ -53,7 +55,7 @@ * Return the frame number that is currently expected to be coming * out of the speakers. (i.e. compensating for playback latency.) */ - virtual int getCurrentPlayingFrame() = 0; + virtual sv_frame_t getCurrentPlayingFrame() = 0; /** * Return the current (or thereabouts) output levels in the range @@ -65,14 +67,14 @@ * Return the sample rate of the source material -- any material * that wants to play at a different rate will sound wrong. */ - virtual int getSourceSampleRate() const = 0; + virtual sv_samplerate_t getSourceSampleRate() const = 0; /** * Return the sample rate set by the target audio device (or the * source sample rate if the target hasn't set one). If the * source and target sample rates differ, resampling will occur. */ - virtual int getTargetSampleRate() const = 0; + virtual sv_samplerate_t getTargetSampleRate() const = 0; /** * Get the block size of the target audio device. This may be an