diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-01 16:24:41 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-01 16:24:41 -0700 |
commit | c36029fc806cf083de3aaf1344d6bd2be8db316f (patch) | |
tree | da88b1f073b8125d764b94b924492d2b05ea4c69 /src/audio.h | |
parent | aa0755f53545fcf343f791f04760f6b934e022e4 (diff) | |
parent | 6982a829e22d2bc7cf7c829c4430a4ea6f5bc7fa (diff) | |
download | mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.gz mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.tar.xz mpd-c36029fc806cf083de3aaf1344d6bd2be8db316f.zip |
Merge branch 'mk/cleanups'
* mk/cleanups: (60 commits)
pass constant pointers
const pointers
unsigned integers and size_t
oggflac: fix GCC warnings
include cleanup
protect locate.h from double inclusion
playlist: eliminate unused fd parameters
jack: made "sample_size" static const
moved jack configuration to the JackData struct
jack: removed unused macros
jack: don't set audioOutput->data=NULL
jack: initialize JackData in jack_initDriver()
jack: added freeJackClient()
jack: initialize jd->client after !jd check
jack: eliminate superfluous freeJackData() calls
mp3: converted the MUTEFRAME_ macros to an enum
mp3: converted the DECODE_ constants to an enum
wavpack: don't use "isp" before initialization
wavpack: moved code to wavpack_open_wvc()
simplified code in the ogg decoder plugin
...
Diffstat (limited to 'src/audio.h')
-rw-r--r-- | src/audio.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/audio.h b/src/audio.h index eab83916a..0032cff22 100644 --- a/src/audio.h +++ b/src/audio.h @@ -19,23 +19,12 @@ #ifndef AUDIO_H #define AUDIO_H -#include "mpd_types.h" #include "tag.h" #include "os_compat.h" +#include "audio_format.h" #define AUDIO_AO_DRIVER_DEFAULT "default" -typedef struct _AudioFormat { - volatile mpd_sint8 channels; - volatile mpd_uint32 sampleRate; - volatile mpd_sint8 bits; -} AudioFormat; - -static inline double audioFormatSizeToTime(const AudioFormat * af) -{ - return 8.0 / af->bits / af->channels / af->sampleRate; -} - void copyAudioFormat(AudioFormat * dest, const AudioFormat * src); int cmpAudioFormat(const AudioFormat * dest, const AudioFormat * src); @@ -66,7 +55,7 @@ int isAudioDeviceOpen(void); int isCurrentAudioFormat(const AudioFormat * audioFormat); -void sendMetadataToAudioDevice(MpdTag * tag); +void sendMetadataToAudioDevice(const MpdTag * tag); /* these functions are called in the main parent process while the child process is busy playing to the audio */ |