Review audio module and examples
This commit is contained in:
parent
36cf1f7dfd
commit
58d2f70b7e
4 changed files with 76 additions and 125 deletions
|
@ -43,7 +43,8 @@ void android_main(struct android_app *app)
|
|||
|
||||
int framesCounter = 0; // Used to count frames
|
||||
|
||||
PlayMusicStream(0, "ambient.ogg");
|
||||
Music ambient = LoadMusicStream("ambient.ogg");
|
||||
PlayMusicStream(ambient);
|
||||
|
||||
SetTargetFPS(60); // Not required on Android, already locked to 60 fps
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
@ -53,7 +54,7 @@ void android_main(struct android_app *app)
|
|||
{
|
||||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
UpdateMusicStream(0);
|
||||
UpdateMusicStream(ambient);
|
||||
|
||||
switch(currentScreen)
|
||||
{
|
||||
|
@ -158,7 +159,8 @@ void android_main(struct android_app *app)
|
|||
|
||||
// TODO: Unload all loaded data (textures, fonts, audio) here!
|
||||
|
||||
UnloadSound(fx); // Unload sound data
|
||||
UnloadSound(fx); // Unload sound data
|
||||
UnloadMusicStream(ambient); // Unload music stream data
|
||||
|
||||
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue