mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-03-04 10:45:32 +01:00
[Core/MD] fixed MegaSD audio sample counter still getting updated while audio playback is paused (fixes #471)
This commit is contained in:
parent
1925efe4d7
commit
46652c7fd7
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
Binary file not shown.
Before Width: | Height: | Size: 4.0 MiB After Width: | Height: | Size: 4.0 MiB |
@ -348,7 +348,15 @@ void megasd_update_cdda(unsigned int samples)
|
|||||||
|
|
||||||
while (samples > 0)
|
while (samples > 0)
|
||||||
{
|
{
|
||||||
/* attempt to read remaing needed samples by default */
|
/* check if audio playback is paused or stopped */
|
||||||
|
if (scd.regs[0x36>>1].byte.h == 0x01)
|
||||||
|
{
|
||||||
|
/* clear remaining needed CD-DA samples without updating counters */
|
||||||
|
cdd_read_audio(samples);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* attempt to read remaining needed samples by default */
|
||||||
count = samples;
|
count = samples;
|
||||||
|
|
||||||
/* check against fade out remaining samples */
|
/* check against fade out remaining samples */
|
||||||
@ -366,7 +374,7 @@ void megasd_update_cdda(unsigned int samples)
|
|||||||
/* read required CD-DA samples */
|
/* read required CD-DA samples */
|
||||||
cdd_read_audio(count);
|
cdd_read_audio(count);
|
||||||
|
|
||||||
/* adjust remaing needed samples count */
|
/* adjust remaining needed samples count */
|
||||||
samples -= count;
|
samples -= count;
|
||||||
|
|
||||||
/* check if fade out is still in progress */
|
/* check if fade out is still in progress */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user