struct fmt {
unsigned short stereo; /* 1 = pcm, 2 = adpcm */
unsigned short channels; /* number of channels */
struct fmt {
unsigned short stereo; /* 1 = pcm, 2 = adpcm */
unsigned short channels; /* number of channels */
unsigned short bytes_sample; /* bytes per sample (all channels) */
unsigned short bits_sample; /* bits per sample (one channel) */
};
unsigned short bytes_sample; /* bytes per sample (all channels) */
unsigned short bits_sample; /* bits per sample (one channel) */
};
-int open_tone(char *file, int *codec, signed long *length, signed long *left)
+int open_tone(char *file, int *codec, signed int *length, signed int *left)
-// printf("%c%c%c%c lenght=%d\n",buffer[0],buffer[1],buffer[2],buffer[3],chunk);
+// printf("%c%c%c%c length=%d\n",buffer[0],buffer[1],buffer[2],buffer[3],chunk);
* the len must be the number of samples, NOT for the bytes to read!!
* the data returned is law-code
*/
* the len must be the number of samples, NOT for the bytes to read!!
* the data returned is law-code
*/
-int read_tone(int fh, unsigned char *buffer, int codec, int len, signed long size, signed long *left, int speed)
+int read_tone(int fh, unsigned char *buffer, int codec, int len, signed int size, signed int *left, int speed)
{
int l;
int offset;
signed short buffer16[len], *buf16 = buffer16;
signed short buffer32[len<<1], *buf32 = buffer32;
unsigned char buffer8[len], *buf8 = buffer8;
{
int l;
int offset;
signed short buffer16[len], *buf16 = buffer16;
signed short buffer32[len<<1], *buf32 = buffer32;
unsigned char buffer8[len], *buf8 = buffer8;
- signed long tone_size, tone_left;
- unsigned long memory = 0;
+ signed int tone_size, tone_left;
+ unsigned int memory = 0;
-void *open_tone_fetched(char *dir, char *file, int *codec, signed long *length, signed long *left)
+void *open_tone_fetched(char *dir, char *file, int *codec, signed int *length, signed int *left)
* read from fetched tone, check size
* the len must be the number of samples, NOT for the bytes to read!!
*/
* read from fetched tone, check size
* the len must be the number of samples, NOT for the bytes to read!!
*/
-int read_tone_fetched(void **fetched, void *buffer, int len, signed long size, signed long *left, int speed)
+int read_tone_fetched(void **fetched, void *buffer, int len, signed int size, signed int *left, int speed)