diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/audio.h b/src/audio.h index 548beb806..ef0f211c2 100644 --- a/src/audio.h +++ b/src/audio.h @@ -35,6 +35,11 @@ typedef struct _AudioFormat { unsigned int audio_device_count(void); +static inline double audioFormatSizeToTime(const AudioFormat * af) +{ + return 8.0 / af->bits / af->channels / af->sampleRate; +} + void copyAudioFormat(AudioFormat * dest, AudioFormat * src); int cmpAudioFormat(AudioFormat * dest, AudioFormat * src); |