added reaaly basic audio
This commit is contained in:
parent
46e26e41e5
commit
9bfcd5552e
8 changed files with 111 additions and 3 deletions
16
include/arc/audio/audio.h
Normal file
16
include/arc/audio/audio.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef ARC_AUDIO_H_
|
||||
#define ARC_AUDIO_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct ARC_Audio ARC_Audio;
|
||||
|
||||
void ARC_Audio_Play(ARC_Audio *audio);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !ARC_AUDIO_H_
|
||||
22
include/arc/audio/config.h
Normal file
22
include/arc/audio/config.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef ARC_AUDIO_CONFIG_H_
|
||||
#define ARC_AUDIO_CONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "arc/std/string.h"
|
||||
|
||||
typedef struct ARC_Config ARC_Config;
|
||||
void ARC_AudioConfig_Init(ARC_Config *config);
|
||||
|
||||
uint8_t ARC_Audio_Read(ARC_Config *config, ARC_String *string, void **value);
|
||||
|
||||
void ARC_Audio_Delete(ARC_Config *config, ARC_String *string, void *value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //ARC_AUDIO_CONFIG_H_
|
||||
12
include/arc/audio/sdl/audio.h
Normal file
12
include/arc/audio/sdl/audio.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#ifndef ARC_SDL_AUDIO_H_
|
||||
#define ARC_SDL_AUDIO_H_
|
||||
|
||||
#ifdef ARC_SDL
|
||||
#include <SDL2/SDL_mixer.h>
|
||||
|
||||
typedef struct ARC_Audio {
|
||||
Mix_Chunk *chunk;
|
||||
} ARC_Audio;
|
||||
|
||||
#endif // !ARC_SDL
|
||||
#endif // !ARC_SDL_AUDIO_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue