forked from JailDoctor/JailAudio
Added function to create new sound from raw buffer
This commit is contained in:
@@ -134,6 +134,13 @@ void JA_DeleteMusic(JA_Music music) {
|
||||
delete music;
|
||||
}
|
||||
|
||||
JA_Sound JA_NewSound(Uint8* buffer, Uint32 length) {
|
||||
JA_Sound sound = new JA_Sound_t();
|
||||
sound->buffer = buffer;
|
||||
sound->length = length;
|
||||
return sound;
|
||||
}
|
||||
|
||||
JA_Sound JA_LoadSound(const char* filename) {
|
||||
JA_Sound sound = new JA_Sound_t();
|
||||
SDL_AudioSpec wavSpec;
|
||||
|
||||
Reference in New Issue
Block a user