-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix gcc warnings and modularize audio system.
- Loading branch information
Showing
11 changed files
with
83 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef __AUDIO_H | ||
#define __AUDIO_H | ||
|
||
void audioInit(void); | ||
void audioEnd(void); | ||
void audioSetVolume(int sfx); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Copyright 2022-2025, Thanks to SP193 and KrahJohilto | ||
Copyright 2025 André Guilherme(Wofl3s) | ||
Licenced under Academic Free License version 3.0 | ||
Review OpenPS2Loader README & LICENSE files for further details. | ||
*/ | ||
|
||
#include <audsrv.h> | ||
|
||
#include "include/audio.h" | ||
#include "include/opl.h" | ||
#include "include/ioman.h" | ||
|
||
/*-- General Audio ------------------------------------------------------------------------------------------------------ | ||
-----------------------------------------------------------------------------------------------------------------------------*/ | ||
|
||
void audioInit(void) | ||
{ | ||
if (audsrv_init() != 0) { | ||
LOG("AUDIO: Failed to initialize audsrv\n"); | ||
LOG("AUDIO: Audsrv returned error string: %s\n", audsrv_get_error_string()); | ||
return; | ||
} | ||
} | ||
|
||
void audioEnd(void) | ||
{ | ||
audsrv_quit(); | ||
} | ||
|
||
void audioSetVolume(int sfx) | ||
{ | ||
int i; | ||
|
||
for (i = 1; i < sfx; i++) | ||
audsrv_adpcm_set_volume(i, gSFXVolume); | ||
|
||
audsrv_adpcm_set_volume(0, gBootSndVolume); | ||
audsrv_set_volume(gBGMVolume); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters