Mercurial > mm7
comparison AudioPlayer.cpp @ 4:8e33efd39355
15.01.13(work)
author | Ritor1 |
---|---|
date | Tue, 15 Jan 2013 17:44:23 +0600 |
parents | 9c0607679772 |
children | 66319a734368 |
comparison
equal
deleted
inserted
replaced
3:bf31c505f4d3 | 4:8e33efd39355 |
---|---|
2089 return result; | 2089 return result; |
2090 } | 2090 } |
2091 // 4ABC9B: inconsistent function type and number of purged bytes | 2091 // 4ABC9B: inconsistent function type and number of purged bytes |
2092 | 2092 |
2093 //----- (004ABD5B) -------------------------------------------------------- | 2093 //----- (004ABD5B) -------------------------------------------------------- |
2094 void AudioPlayer::Release() | 2094 void AudioPlayer::Release() //Освободить |
2095 { | 2095 { |
2096 AudioPlayer *v1; // esi@1 | 2096 AudioPlayer *pAudioPlayer; // esi@1 |
2097 int v2; // edi@1 | 2097 int v2; // edi@1 |
2098 MixerChannel *v3; // ebx@3 | 2098 MixerChannel *pMixerChannel; // ebx@3 |
2099 char v4; // dl@5 | 2099 char v4; // dl@5 |
2100 int v5; // ebx@6 | 2100 int v5; // ebx@6 |
2101 AudioPlayer_3DSample *v6; // edi@7 | 2101 AudioPlayer_3DSample *p3DSample; // edi@7 |
2102 int v7; // edx@14 | 2102 int v7; // edx@14 |
2103 int v8; // ecx@14 | 2103 int v8; // ecx@14 |
2104 void *v9; // ecx@15 | 2104 void *v9; // ecx@15 |
2105 | 2105 |
2106 v1 = this; | 2106 pAudioPlayer = this; |
2107 v2 = 0; | 2107 v2 = 0; |
2108 if ( this->bPlayerReady ) | 2108 if ( this->bPlayerReady ) |
2109 { | 2109 { |
2110 CloseHandle(pVideoPlayer->hMagicVid); | 2110 CloseHandle(pVideoPlayer->hMagicVid); |
2111 CloseHandle(pVideoPlayer->hMightVid); | 2111 CloseHandle(pVideoPlayer->hMightVid); |
2112 v1->StopChannels(-1, -1); | 2112 pAudioPlayer->StopChannels(-1, -1); |
2113 if ( v1->uMixerChannels > 0 ) | 2113 if ( pAudioPlayer->uMixerChannels > 0 ) |
2114 { | 2114 { |
2115 v3 = v1->pMixerChannels; | 2115 pMixerChannel = pAudioPlayer->pMixerChannels; |
2116 do | 2116 do |
2117 { | 2117 { |
2118 AIL_release_sample_handle(v3->hSample); | 2118 AIL_release_sample_handle(pMixerChannel->hSample); |
2119 ++v2; | 2119 ++v2; |
2120 ++v3; | 2120 ++pMixerChannel; |
2121 } | 2121 } |
2122 while ( v2 < v1->uMixerChannels ); | 2122 while ( v2 < pAudioPlayer->uMixerChannels ); |
2123 } | 2123 } |
2124 if ( ReadWindowsRegistryInt("Disable3DSound", 0) != 1 ) | 2124 if ( ReadWindowsRegistryInt("Disable3DSound", 0) != 1 ) |
2125 { | 2125 { |
2126 v5 = 0; | 2126 v5 = 0; |
2127 v1->CheckA3DSupport(v4); | 2127 pAudioPlayer->CheckA3DSupport(v4); |
2128 if ( v1->uNum3DSamples > 0 ) | 2128 if ( pAudioPlayer->uNum3DSamples > 0 ) |
2129 { | 2129 { |
2130 v6 = v1->p3DSamples; | 2130 p3DSample = pAudioPlayer->p3DSamples; |
2131 do | 2131 do |
2132 { | 2132 { |
2133 if ( v6->hSample ) | 2133 if ( p3DSample->hSample ) |
2134 { | 2134 { |
2135 AIL_release_3D_sample_handle(v6->hSample); | 2135 AIL_release_3D_sample_handle(p3DSample->hSample); |
2136 v6->hSample = 0; | 2136 p3DSample->hSample = 0; |
2137 } | 2137 } |
2138 ++v5; | 2138 ++v5; |
2139 ++v6; | 2139 ++p3DSample; |
2140 } | 2140 } |
2141 while ( v5 < v1->uNum3DSamples ); | 2141 while ( v5 < pAudioPlayer->uNum3DSamples ); |
2142 } | 2142 } |
2143 if ( v1->h3DSoundProvider ) | 2143 if ( pAudioPlayer->h3DSoundProvider ) |
2144 { | 2144 { |
2145 AIL_close_3D_provider(v1->h3DSoundProvider); | 2145 AIL_close_3D_provider(pAudioPlayer->h3DSoundProvider); |
2146 v1->h3DSoundProvider = 0; | 2146 pAudioPlayer->h3DSoundProvider = 0; |
2147 } | 2147 } |
2148 } | 2148 } |
2149 if ( v1->hAILRedbook ) | 2149 if ( pAudioPlayer->hAILRedbook ) |
2150 { | 2150 { |
2151 AIL_redbook_stop(v1->hAILRedbook); | 2151 AIL_redbook_stop(pAudioPlayer->hAILRedbook); |
2152 AIL_redbook_set_volume((HREDBOOK)v8, v7); | 2152 AIL_redbook_set_volume((HREDBOOK)v8, v7); |
2153 AIL_redbook_close(v1->hAILRedbook); | 2153 AIL_redbook_close(pAudioPlayer->hAILRedbook); |
2154 } | 2154 } |
2155 AIL_shutdown(); | 2155 AIL_shutdown(); |
2156 pSoundList->Release(); | 2156 pSoundList->Release(); |
2157 v9 = *(void **)&v1->field_C78[0]; | 2157 v9 = *(void **)&pAudioPlayer->field_C78[0]; |
2158 if ( v9 ) | 2158 if ( v9 ) |
2159 ReleaseSoundData(v9); | 2159 ReleaseSoundData(v9); |
2160 CloseHandle(v1->hAudioSnd); | 2160 CloseHandle(pAudioPlayer->hAudioSnd); |
2161 } | 2161 } |
2162 } | 2162 } |
2163 | 2163 |
2164 //----- (004ABE55) -------------------------------------------------------- | 2164 //----- (004ABE55) -------------------------------------------------------- |
2165 void AudioPlayer::_4ABE55(MixerChannel *pChannel) | 2165 void AudioPlayer::_4ABE55(MixerChannel *pChannel) |