forked from Ports/perfect_dark
port: begin implementing audio
mixer taken from sm64-port and modified to fit PD's naudio thing MP3 playback not supported yet audio buffering sucks
This commit is contained in:
1 parent
866be01860
commit
ffb5ca4b5b
19 files changed
+1403
-15
No files matched your search
+13
-1
@@ -22,7 +22,9 @@
|
||||
#include "types.h"
|
||||
|
||||
#include "video.h"
|
||||
#include "audio.h"
|
||||
#include "input.h"
|
||||
#include "mixer.h"
|
||||
|
||||
/*
|
||||
* private typedefs and defines
|
||||
@@ -220,7 +222,7 @@ void __scUpdateViMode(void)
|
||||
void schedSubmitTask(OSSched *sc, OSScTask *t)
|
||||
{
|
||||
if (sc->doAudio && t->list.t.type == M_AUDTASK) {
|
||||
// TODO: audio frame
|
||||
// send this into the mixer
|
||||
} else if (t->list.t.type == M_GFXTASK) {
|
||||
videoSubmitCommands((Gfx *)t->list.t.data_ptr);
|
||||
}
|
||||
@@ -231,6 +233,15 @@ void schedStartFrame(OSSched *sc)
|
||||
videoStartFrame();
|
||||
}
|
||||
|
||||
void schedAudioFrame(OSSched *sc)
|
||||
{
|
||||
if (!g_SndDisabled)
|
||||
{
|
||||
amgrFrame();
|
||||
audioEndFrame();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle a retrace (vsync) event.
|
||||
*
|
||||
@@ -272,6 +283,7 @@ void schedEndFrame(OSSched *sc)
|
||||
joy00014238();
|
||||
|
||||
sndHandleRetrace();
|
||||
schedAudioFrame(sc);
|
||||
schedRenderCrashPeriodically(sc->frameCount);
|
||||
videoEndFrame();
|
||||
|
||||
|
||||
Reference in new issue
Block a user