summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/i_sound.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/i_sound.c')
-rw-r--r--apps/plugins/doom/i_sound.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c
index 641721a231..e2eeab0c3d 100644
--- a/apps/plugins/doom/i_sound.c
+++ b/apps/plugins/doom/i_sound.c
@@ -50,7 +50,7 @@
50// Needed for calling the actual sound output. 50// Needed for calling the actual sound output.
51#define SAMPLECOUNT 512 51#define SAMPLECOUNT 512
52 52
53#define NUM_CHANNELS 16 53#define NUM_CHANNELS 24
54// It is 2 for 16bit, and 2 for two channels. 54// It is 2 for 16bit, and 2 for two channels.
55#define BUFMUL 2 55#define BUFMUL 2
56#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL) 56#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
@@ -66,7 +66,7 @@
66// Basically, samples from all active internal channels 66// Basically, samples from all active internal channels
67// are modifed and added, and stored in the buffer 67// are modifed and added, and stored in the buffer
68// that is submitted to the audio device. 68// that is submitted to the audio device.
69signed short mixbuffer[MIXBUFFERSIZE]; 69signed short *mixbuffer;
70/* Don't place this in IRAM! 70/* Don't place this in IRAM!
71 * Sound playback uses DMA, and not all IRAM is DMA capable on coldfire. */ 71 * Sound playback uses DMA, and not all IRAM is DMA capable on coldfire. */
72 72
@@ -97,7 +97,7 @@ channel_info_t channelinfo[NUM_CHANNELS] IBSS_ATTR;
97 97
98int *vol_lookup; // Volume lookups. 98int *vol_lookup; // Volume lookups.
99 99
100int steptable[256]; // Pitch to stepping lookup. (Not setup properly right now) 100int *steptable; // Pitch to stepping lookup. (Not setup properly right now)
101 101
102// 102//
103// This function loads the sound data from the WAD lump for single sound. 103// This function loads the sound data from the WAD lump for single sound.
@@ -501,6 +501,9 @@ void I_InitSound()
501 501
502 vol_lookup=malloc(128*256*sizeof(int)); 502 vol_lookup=malloc(128*256*sizeof(int));
503 503
504 mixbuffer=malloc(MIXBUFFERSIZE*sizeof(short));
505 steptable=malloc(256*sizeof(int));
506
504 for (i=1 ; i<NUMSFX ; i++) 507 for (i=1 ; i<NUMSFX ; i++)
505 { 508 {
506 if (!S_sfx[i].link) // Alias? Example is the chaingun sound linked to pistol. 509 if (!S_sfx[i].link) // Alias? Example is the chaingun sound linked to pistol.