1
1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
521 B

#ifndef AUDIO_H
#define AUDIO_H
#include <SDL2/SDL_audio.h>
#include "types.h"
#include <math.h>
#include <stdlib.h>
#define G_AUDIO_SFREQ 8000
#define G_AUDIO_BSIZE 512
struct game_sounds {
unsigned int t;
Mix_Chunk *collision;
Mix_Chunk *rope_attach;
Mix_Chunk *rope_pull;
/* Looping samples (need backbuffer to fill while playing ) */
Mix_Chunk *menu;
};
extern struct game_sounds game_sounds;
void play_game_sound(Mix_Chunk *chunk, int len, int channel);
void start_audio(void);
#endif