# These are good for regular use.
#OPTS = -O2 -fomit-frame-pointer -falign-functions=2 -falign-loops=2 -falign-jumps=2
# These are handy for debugging.
-OPTS = -g
-#OPTS = -g -Wall -Wextra
+OPTS = -g -Wall -Wextra
# Define where you want Frotz installed (typically /usr/local).
#
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
+#include <signal.h>
#ifdef USE_NCURSES_H
#include <ncurses.h>
*/
void os_beep (int number)
{
+ int i = number;
+ i++;
+
beep();
}/* os_beep */
*/
void os_prepare_sample (int number)
{
+ int i = number;
+ i++;
+
return;
}/* os_prepare_sample */
EFFECT myeffect;
int err;
static pthread_attr_t attr;
+ zword foo = eos;
+
+ foo++;
if (blorb_map == NULL) return;
int default_driver;
ao_device *device;
ao_sample_format format;
-
int i;
ao_initialize();
*/
static void stereoize(float *outbuf, float *inbuf, size_t length)
{
- int count;
+ size_t count;
int outcount;
outcount = 0;
bleep_playing = FALSE;
memset(bleepbuffer, 0, BUFFSIZE * sizeof(float) * 2);
+// fseek(myeffect.fp, filestart, SEEK_SET);
+
pthread_mutex_unlock(&mutex);
sem_post(&audio_empty);
- fseek(myeffect.fp, filestart, SEEK_SET);
sf_close(sndfile);
free(floatbuffer);
free(floatbuffer2);
if (myeffect.type == MOD) playmod(&myeffect);
else if (myeffect.type == OGGV) playogg(&myeffect);
- else;
+ else { } /* do nothing */
pthread_exit(NULL);
{
short *shortbuffer;
- int modlen;
- int count;
+// int modlen;
+// int count;
char *filedata;
long size;
fseek(myeffect.fp, filestart, SEEK_SET);
if (!mod) {
printf("Unable to load MOD chunk.\n\r");
- return;
+ return 0;
}
if (myeffect.vol < 1) myeffect.vol = 1;
free(shortbuffer);
free(filedata);
- return;
+ return 0;
} /* playmod */
EFFECT myeffect = *raw_effect;
+ filestart = ftell(myeffect.fp);
fseek(myeffect.fp, myeffect.result.data.startpos, SEEK_SET);
if (ov_open_callbacks(myeffect.fp, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0) {
printf("Unable to load OGGV chunk.\n\r");
- return;
+ return 0;
}
info = ov_info(&vf, -1);
if (info == NULL) {
printf("Unable to get info on OGGV chunk.\n\r");
- return;
+ return 0;
}
if (myeffect.vol < 1) myeffect.vol = 1;
pthread_mutex_unlock(&mutex);
sem_post(&audio_full);
}
+
+// fseek(myeffect.fp, filestart, SEEK_SET);
music_playing = FALSE;
pthread_mutex_unlock(&mutex);
free(shortbuffer);
- return;
+ return 0;
} /* playogg */
#endif /* NO_SOUND */