mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
some changes to sync stuff
svn-id: r12286
This commit is contained in:
parent
d96ec8672b
commit
9d7d23a7c6
@ -585,8 +585,7 @@ void IMuseDigital::getLipSync(int soundId, int syncId, int32 msPos, int32 &width
|
||||
if (msPos < 65536) {
|
||||
for (int l = 0; l < MAX_DIGITAL_TRACKS; l++) {
|
||||
if ((_track[l].idSound == soundId) && _track[l].used) {
|
||||
sync_size = _sound->getSyncSizeById(_track[l].soundHandle, syncId);
|
||||
sync_ptr = _sound->getSyncPtrById(_track[l].soundHandle, syncId);
|
||||
_sound->getSyncSizeAndPtrById(_track[l].soundHandle, syncId, sync_size, &sync_ptr);
|
||||
if ((sync_size != 0) && (sync_ptr != NULL)) {
|
||||
sync_size /= 4;
|
||||
while (sync_size--) {
|
||||
|
@ -352,18 +352,17 @@ int ImuseDigiSndMgr::getJumpIdByRegionId(soundStruct *soundHandle, int number) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ImuseDigiSndMgr::getSyncSizeById(soundStruct *soundHandle, int number) {
|
||||
void ImuseDigiSndMgr::getSyncSizeAndPtrById(soundStruct *soundHandle, int number, int32 &sync_size, byte **sync_ptr) {
|
||||
Common::StackLock tmpLock(_mutex);
|
||||
assert(soundHandle && checkForProperHandle(soundHandle));
|
||||
assert(number >= 0 && number < soundHandle->numSyncs);
|
||||
return soundHandle->sync[number].size;
|
||||
}
|
||||
|
||||
byte *ImuseDigiSndMgr::getSyncPtrById(soundStruct *soundHandle, int number) {
|
||||
Common::StackLock tmpLock(_mutex);
|
||||
assert(soundHandle && checkForProperHandle(soundHandle));
|
||||
assert(number >= 0 && number < soundHandle->numSyncs);
|
||||
return soundHandle->sync[number].ptr;
|
||||
assert(number >= 0);
|
||||
if (number < soundHandle->numSyncs) {
|
||||
sync_size = soundHandle->sync[number].size;
|
||||
*sync_ptr = soundHandle->sync[number].ptr;
|
||||
} else {
|
||||
sync_size = 0;
|
||||
*sync_ptr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int ImuseDigiSndMgr::getRegionIdByHookId(soundStruct *soundHandle, int number) {
|
||||
|
@ -130,8 +130,7 @@ public:
|
||||
int getJumpHookId(soundStruct *soundHandle, int number);
|
||||
int getJumpFade(soundStruct *soundHandle, int number);
|
||||
char *getMarker(soundStruct *soundHandle, int number);
|
||||
int getSyncSizeById(soundStruct *soundHandle, int number);
|
||||
byte *getSyncPtrById(soundStruct *soundHandle, int number);
|
||||
void getSyncSizeAndPtrById(soundStruct *soundHandle, int number, int32 &sync_size, byte **sync_ptr);
|
||||
|
||||
int32 getDataFromRegion(soundStruct *soundHandle, int region, byte **buf, int32 offset, int32 size);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user