fixed audio playing - dirty way
This commit is contained in:
@@ -126,6 +126,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
u8 songLoaded, volume, realVolume, songPlaying, songInLoop, songFinished;
|
u8 songLoaded, volume, realVolume, songPlaying, songInLoop, songFinished;
|
||||||
|
u8 hack; // TODO
|
||||||
std::vector<AudioListenerRef *> songListeners;
|
std::vector<AudioListenerRef *> songListeners;
|
||||||
FILE *wav;
|
FILE *wav;
|
||||||
audsrv_fmt_t format;
|
audsrv_fmt_t format;
|
||||||
|
|||||||
@@ -178,8 +178,20 @@ void Audio::startThread(FileService *t_fileService)
|
|||||||
/** Main thread loop */
|
/** Main thread loop */
|
||||||
void Audio::threadLoop()
|
void Audio::threadLoop()
|
||||||
{
|
{
|
||||||
if (songPlaying)
|
// ---
|
||||||
songPlaying = 1; // GCC11: wtf? we need to put some code there, because song is not playing..
|
// TODO - bug here, GCC11 is doing some optimizations and this method probably think that
|
||||||
|
// "songPlaying" is false + on real PS2 I see that program tries to turn on this
|
||||||
|
// method as rarely as possible (slow, flickering sound). On GCC 3.2.3 this one was fine lol!.
|
||||||
|
if (songPlaying) // HACK1 - im not proud of that
|
||||||
|
songPlaying = 1;
|
||||||
|
if (songLoaded)
|
||||||
|
songLoaded = 1;
|
||||||
|
if (hack == 1) // HACK2 - lets give some work to gcc lol
|
||||||
|
hack = 2;
|
||||||
|
else
|
||||||
|
hack = 1;
|
||||||
|
// ---
|
||||||
|
|
||||||
if (!songPlaying || !songLoaded)
|
if (!songPlaying || !songLoaded)
|
||||||
return;
|
return;
|
||||||
if (songFinished)
|
if (songFinished)
|
||||||
|
|||||||
Reference in New Issue
Block a user