19#define SP_WAVE_WAV_ID "wav"
20#define SP_WAVE_AIFF_ID "aiff"
21#define SP_WAVE_AIFC_ID "aifc"
23#if BYTE_ORDER == BIG_ENDIAN
24#define SP_WAV_NEED_SWAP 1
26#define SP_WAV_NEED_SWAP 0
29#if BYTE_ORDER == BIG_ENDIAN
30#define SP_AIFF_NEED_SWAP 0
32#define SP_AIFF_NEED_SWAP 1
35#define SP_WAVE_FORMAT_SIZE 32
36#define SP_WAVE_FILE_TYPE_SIZE 32
37#define SP_WAVE_FILE_DESC_SIZE 128
38#define SP_WAVE_FILE_FILTER_SIZE 32
43typedef struct _spWaveInfo {
56#define SP_SONG_NO_INFO 0
57#define SP_SONG_TRACK_MASK (1L<<0)
58#define SP_SONG_TITLE_MASK (1L<<1)
59#define SP_SONG_ARTIST_MASK (1L<<2)
60#define SP_SONG_ALBUM_MASK (1L<<3)
61#define SP_SONG_GENRE_MASK (1L<<4)
62#define SP_SONG_RELEASE_MASK (1L<<5)
63#define SP_SONG_COPYRIGHT_MASK (1L<<6)
64#define SP_SONG_ENGINEER_MASK (1L<<7)
65#define SP_SONG_SOURCE_MASK (1L<<8)
66#define SP_SONG_SOFTWARE_MASK (1L<<9)
67#define SP_SONG_SUBJECT_MASK (1L<<10)
68#define SP_SONG_COMMENT_MASK (1L<<11)
69#define SP_SONG_ALBUM_ARTIST_MASK (1L<<12)
70#define SP_SONG_COMPOSER_MASK (1L<<13)
71#define SP_SONG_LYRICIST_MASK (1L<<14)
72#define SP_SONG_PRODUCER_MASK (1L<<15)
73#define SP_SONG_ISRC_MASK (1L<<16)
74#define SP_SONG_TRACK_TOTAL_MASK (1L<<17)
75#define SP_SONG_DISC_MASK (1L<<18)
76#define SP_SONG_DISC_TOTAL_MASK (1L<<19)
77#define SP_SONG_TEMPO_MASK (1L<<20)
78#define SP_SONG_ID3V1_MASK (1L<<24)
79#define SP_SONG_ID3V2_2_MASK (1L<<25)
80#define SP_SONG_ID3V2_3_MASK (1L<<26)
81#define SP_SONG_ID3V2_4_MASK (1L<<27)
82#define SP_SONG_UTF8_STRING_IN_FILE_MASK (1L<<28)
83#define SP_SONG_ISO8859_1_STRING_IN_FILE_MASK (1L<<29)
86#define SP_SONG_ID3V2_SUPPORT_MASK (SP_SONG_TRACK_MASK|SP_SONG_TITLE_MASK|SP_SONG_ARTIST_MASK|SP_SONG_ALBUM_MASK|SP_SONG_GENRE_MASK|SP_SONG_RELEASE_MASK|SP_SONG_COPYRIGHT_MASK|SP_SONG_ENGINEER_MASK|SP_SONG_SOURCE_MASK|SP_SONG_SOFTWARE_MASK|SP_SONG_COMMENT_MASK|SP_SONG_ALBUM_ARTIST_MASK|SP_SONG_COMPOSER_MASK|SP_SONG_LYRICIST_MASK|SP_SONG_ISRC_MASK|SP_SONG_TRACK_TOTAL_MASK|SP_SONG_DISC_MASK|SP_SONG_DISC_TOTAL_MASK|SP_SONG_TEMPO_MASK)
88#define SP_SONG_ID3V2_2_SUPPORT_MASK (SP_SONG_ID3V2_SUPPORT_MASK|SP_SONG_ID3V2_2_MASK)
90#define SP_SONG_ID3V2_3_SUPPORT_MASK (SP_SONG_ID3V2_SUPPORT_MASK|SP_SONG_ID3V2_3_MASK)
92#define SP_SONG_ID3V2_4_SUPPORT_MASK (SP_SONG_ID3V2_SUPPORT_MASK|SP_SONG_ID3V2_4_MASK)
94#define SP_SONG_ID3V2_ALL_SUPPORT_MASK (SP_SONG_ID3V2_SUPPORT_MASK|SP_SONG_ID3V2_2_MASK|SP_SONG_ID3V2_3_MASK|SP_SONG_ID3V2_4_MASK)
96#define SP_SONG_INFO_SIZE 128
98#define SP_SONG_INFO_GENRE_SIZE 32
99#define SP_SONG_INFO_ALBUM_ARTIST_SIZE 96
101#define SP_SONG_INFO_RELEASE_SIZE 48
102#define SP_SONG_INFO_PRODUCER_SIZE 64
104#define SP_SONG_INFO_SOURCE_SIZE 48
105#define SP_SONG_INFO_COMPOSER_SIZE 80
107#define SP_SONG_INFO_SOFTWARE_SIZE 48
108#define SP_SONG_INFO_LYRICIST_SIZE 80
110#define SP_SONG_INFO_SUBJECT_SIZE 104
111#define SP_SONG_INFO_ISRC_SIZE 24
117typedef struct _spSongInfo {
138typedef struct _spSongInfoV2 {
163typedef struct _spSongInfo *spSongInfoPtr;
164typedef struct _spSongInfoV2 *spSongInfoV2Ptr;
172extern spBool spIsWavFile(
const char *filename);
175extern long _spReadWavData(
spWaveInfo *wave_info,
char *data,
long length, FILE *fp);
176extern long _spWriteWavData(
spWaveInfo *wave_info,
char *data,
long length, FILE *fp);
177extern unsigned long spGetWavSongInfoMask(
void);
185#define spReadWavData(wave_info, data, length, fp) _spReadWavData(wave_info, (char *)(data), length, fp)
186#define spWriteWavData(wave_info, data, length, fp) _spWriteWavData(wave_info, (char *)(data), length, fp)
188extern spBool spIsAiffFile(
const char *filename);
191extern long _spReadAiffData(
spWaveInfo *wave_info,
char *data,
long length, FILE *fp);
192extern long _spWriteAiffData(
spWaveInfo *wave_info,
char *data,
long length, FILE *fp);
193extern unsigned long spGetAiffSongInfoMask(
void);
199#define spReadAiffData(wave_info, data, length, fp) _spReadAiffData(wave_info, (char *)(data), length, fp)
200#define spWriteAiffData(wave_info, data, length, fp) _spWriteAiffData(wave_info, (char *)(data), length, fp)
224extern void spPlayFileUseDatLink(
spBool flag);
225extern void spPlayFileUseWav(
spBool flag);
226extern spBool spSetPlayCommand(
const char *format);
227extern spBool spPlayFile(
const char *filename,
int num_channel,
double samp_rate);
228extern spBool spPlayFileAsync(
const char *filename,
int num_channel,
double samp_rate);
#define SP_SONG_INFO_RELEASE_SIZE
Definition spWave.h:101
#define SP_SONG_INFO_SIZE
Definition spWave.h:96
#define SP_WAVE_FILE_TYPE_SIZE
Definition spWave.h:36
#define SP_SONG_INFO_PRODUCER_SIZE
Definition spWave.h:102
#define SP_SONG_INFO_LYRICIST_SIZE
Definition spWave.h:108
#define SP_SONG_INFO_SOFTWARE_SIZE
Definition spWave.h:107
#define SP_WAVE_FILE_FILTER_SIZE
Definition spWave.h:38
#define SP_SONG_INFO_ISRC_SIZE
Definition spWave.h:111
#define SP_SONG_INFO_SOURCE_SIZE
Definition spWave.h:104
#define SP_SONG_INFO_GENRE_SIZE
Definition spWave.h:98
#define SP_SONG_INFO_COMPOSER_SIZE
Definition spWave.h:105
#define SP_WAVE_FILE_DESC_SIZE
Definition spWave.h:37
#define SP_SONG_INFO_ALBUM_ARTIST_SIZE
Definition spWave.h:99
#define SP_SONG_INFO_SUBJECT_SIZE
Definition spWave.h:110
spBool spShowSongInfo(spSongInfo *song_info, const char *indent, FILE *fp)
spBool spInitSongInfo(spSongInfo *song_info)
spBool spInitWaveInfo(spWaveInfo *wave_info)
spBool spInitSongInfoV2(spSongInfoV2 *song_info)
spBool spEqSongInfo(spSongInfo *info1, spSongInfo *info2)
spBool spShowSongInfoV2(spSongInfoV2 *song_info, const char *indent, FILE *fp)
spBool spCopySongInfo(spSongInfo *dest_info, spSongInfo *src_info)
spBool spEqSongInfoV2(spSongInfoV2 *info1, spSongInfoV2 *info2)
spBool spCopySongInfoV2(spSongInfoV2 *dest_info, spSongInfoV2 *src_info)
spBool spCopyWaveInfo(spWaveInfo *dest_info, spWaveInfo *src_info)
unsigned long info_mask
Definition spWave.h:118
spLong32 track
Definition spWave.h:119
unsigned long info_mask
Definition spWave.h:139
spLong32 track
Definition spWave.h:140
spLong32 track_total
Definition spWave.h:148
spLong32 disc_total
Definition spWave.h:150
spLong32 disc
Definition spWave.h:149
spLong32 tempo
Definition spWave.h:151
int samp_bit
Definition spWave.h:49
spLong length
Definition spWave.h:53
double samp_rate
Definition spWave.h:51
long bit_rate
Definition spWave.h:52
int num_channel
Definition spWave.h:50
spLong header_size
Definition spWave.h:48
int buffer_size
Definition spWave.h:47