diff options
author | Wohlstand <admin@wohlnet.ru> | 2016-12-07 17:41:47 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2016-12-07 17:41:47 +0300 |
commit | bba6c868211b1e88180365a339b5bf59a6fb2637 (patch) | |
tree | 9c42362484f17e8be772f53e1e9b078c992706dd /src/dbopl.cpp | |
parent | bd044bbb9d57f0b1a32c4e693dc14378b33e05ef (diff) | |
download | libADLMIDI-bba6c868211b1e88180365a339b5bf59a6fb2637.tar.gz libADLMIDI-bba6c868211b1e88180365a339b5bf59a6fb2637.tar.bz2 libADLMIDI-bba6c868211b1e88180365a339b5bf59a6fb2637.zip |
Little refactoring of adl_play() function to fix return size value
Diffstat (limited to 'src/dbopl.cpp')
-rw-r--r-- | src/dbopl.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dbopl.cpp b/src/dbopl.cpp index e21fde0..40b2220 100644 --- a/src/dbopl.cpp +++ b/src/dbopl.cpp @@ -1927,6 +1927,17 @@ namespace DBOPL chip.GenerateBlock3(*samples, out); } + void Handler::GenerateArr(Bit32s *out, ssize_t *samples) + { + if(GCC_UNLIKELY(*samples > 512)) + *samples = 512; + + if(!chip.opl3Active) + chip.GenerateBlock2(static_cast<Bitu>(*samples), out); + else + chip.GenerateBlock3(static_cast<Bitu>(*samples), out); + } + void Handler::Init(Bitu rate) { InitTables(); |