Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

sndstream.h

00001 /*
00002  * sndstream.h - SH-4 support routines for SPU streaming sound driver
00003  *
00004  * (C) 2000 Dan Potter
00005  *
00006  * $Id: sndstream.h,v 1.2 2002/09/06 23:16:09 ben Exp $
00007  */
00008 
00009 #ifndef __SNDSTREAM_H
00010 #define __SNDSTREAM_H
00011 
00012 #include "extern_def.h"
00013 
00014 DCPLAYA_EXTERN_C_START
00015 
00016 
00017 /* Load sample data from SH-4 ram into SPU ram (auto-allocate RAM) */
00018 uint32 stream_load_sample(const uint16 *src, uint32 len);
00019 
00020 /* Dump all loaded sample data */
00021 void stream_dump_samples();
00022 
00023 /* Set "get data" callback */
00024 void stream_set_callback(void *(*func)(int));
00025 
00026 /* Prefill buffers -- do this before calling start() */
00027 void stream_prefill();
00028 
00029 /* Initialize stream system */
00030 int stream_init(void* (*callback)(int), int samples);
00031 
00032 /* Shut everything down and free mem */
00033 void stream_shutdown();
00034 
00035 /* Start streaming */
00036 void stream_start(int samples, uint32 freq, int vol, int stereo);
00037 
00038 /* Stop streaming */
00039 void stream_stop();
00040 
00041 /* Poll streamer to load more data if neccessary; zero if ok, -1 if the
00042    poll function returns NULL. */
00043 int stream_poll();
00044 
00045 /* Start a sound sample on the given channel */
00046 void stream_play_effect(int chn, uint32 src, uint32 freq, uint32 len, uint32 vol, uint32 pan);
00047 
00048 /* Stop a sound sample on the given channel */
00049 void stream_stop_effect(int chn);
00050 
00051 /* Set the volume on the streaming channels */
00052 void stream_volume(int vol);
00053 
00054 /* Set the frequency of thew streaming channel */
00055 void stream_frq(int frq);
00056 
00057 /* 0:mono 1:stereo 2:invert-stereo */
00058 void stream_stereo(int stereo);
00059 
00060 DCPLAYA_EXTERN_C_END
00061 
00062 #endif  /* __SNDSTREAM_H */
00063 

dcplaya documentation version 1.2 Generated on January 2004 by doxygen 1.3.5