Mercurial > mm7
comparison AudioPlayer.cpp @ 390:35a62d1948d4
More sound fixes
author | Nomad |
---|---|
date | Sat, 23 Feb 2013 08:27:32 +0200 |
parents | d95a91011d57 |
children | 74205b91647b 747933903b1c |
comparison
equal
deleted
inserted
replaced
389:e32950ebabb9 | 390:35a62d1948d4 |
---|---|
974 | 974 |
975 //pMixerChannel5 = &pAudioPlayer->pMixerChannels[v62]; | 975 //pMixerChannel5 = &pAudioPlayer->pMixerChannels[v62]; |
976 auto channel = &pMixerChannels[v62]; | 976 auto channel = &pMixerChannels[v62]; |
977 AIL_init_sample(channel->hSample); | 977 AIL_init_sample(channel->hSample); |
978 AIL_set_sample_file(channel->hSample, (char *)pSoundList->pSounds[sound_id].pSoundData[a7] + 4 * (a7 == 0), -1); | 978 AIL_set_sample_file(channel->hSample, (char *)pSoundList->pSounds[sound_id].pSoundData[a7] + 4 * (a7 == 0), -1); |
979 int s = AIL_sample_status(channel->hSample); | |
980 if (uVolume) | 979 if (uVolume) |
981 sample_volume = uVolume; | 980 sample_volume = uVolume; |
982 AIL_set_sample_volume(channel->hSample, sample_volume); | 981 AIL_set_sample_volume(channel->hSample, sample_volume); |
983 | 982 |
984 int object_type = a3 & 7, | 983 int object_type = a3 & 7, |
1618 LABEL_37: | 1617 LABEL_37: |
1619 for (uint i = 0; i < uMixerChannels; ++i) | 1618 for (uint i = 0; i < uMixerChannels; ++i) |
1620 { | 1619 { |
1621 auto channel = pMixerChannels + i; | 1620 auto channel = pMixerChannels + i; |
1622 | 1621 |
1623 AIL_end_sample(channel->hSample); | 1622 if (AIL_sample_status(channel->hSample) == AIL::Sample::Done) |
1624 _4ABE55(channel); | 1623 { |
1624 AIL_end_sample(channel->hSample); | |
1625 _4ABE55(channel); | |
1626 } | |
1625 } | 1627 } |
1626 | 1628 |
1627 for (uint i = 0; i < uMixerChannels; ++i) | 1629 for (uint i = 0; i < uMixerChannels; ++i) |
1628 { | 1630 { |
1629 auto channel = pMixerChannels + i; | 1631 auto channel = pMixerChannels + i; |
1632 if (channel->source_pid <= 0) | |
1633 continue; | |
1634 | |
1630 int source_type = channel->source_pid & 7, | 1635 int source_type = channel->source_pid & 7, |
1631 source_id = channel->source_pid >> 3; | 1636 source_id = channel->source_pid >> 3; |
1632 int source_x, | 1637 int source_x, |
1633 source_y, | 1638 source_y, |
1634 source_z; | 1639 source_z; |
2218 int v15; // [sp+4Ch] [bp-8h]@5 | 2223 int v15; // [sp+4Ch] [bp-8h]@5 |
2219 int v16; // [sp+50h] [bp-4h]@5 | 2224 int v16; // [sp+50h] [bp-4h]@5 |
2220 | 2225 |
2221 v2 = 0; | 2226 v2 = 0; |
2222 //v3 = this; | 2227 //v3 = this; |
2223 if ( pSoundList->pSounds ) | 2228 if (!pSoundList->pSounds) |
2224 { | 2229 return; |
2230 | |
2225 v4 = &pSoundList->pSounds[pChannel->uSourceTrackIdx]; | 2231 v4 = &pSoundList->pSounds[pChannel->uSourceTrackIdx]; |
2226 if ( v4->eType == SOUND_DESC_SWAP) | 2232 if ( v4->eType == SOUND_DESC_SWAP) |
2227 { | 2233 { |
2228 if ( v4->pSoundData[0] && !(v4->uFlags & 1) ) | 2234 if ( v4->pSoundData[0] && !(v4->uFlags & 1) ) |
2229 { | 2235 { |
2268 while ( v6 ^ v13 ); | 2274 while ( v6 ^ v13 ); |
2269 } | 2275 } |
2270 } | 2276 } |
2271 } | 2277 } |
2272 } | 2278 } |
2273 } | |
2274 } | 2279 } |
2275 | 2280 |
2276 | 2281 |
2277 | 2282 |
2278 //----- (004AAEA6) -------------------------------------------------------- | 2283 //----- (004AAEA6) -------------------------------------------------------- |