Changeset 406 for trunk/src/fmod/fmod_audio.cc
- Timestamp:
- 06/20/15 00:05:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/fmod/fmod_audio.cc
r399 r406 41 41 if ( info ) 42 42 { 43 FMOD_SYSTEM* system = (FMOD_SYSTEM*)m_system;44 FMOD_SOUND* sample = (FMOD_SOUND*)( info->fmod_sound );43 FMOD_SYSTEM* system = static_cast<FMOD_SYSTEM*>( m_system ); 44 FMOD_SOUND* sample = static_cast<FMOD_SOUND*>( info->fmod_sound ); 45 45 FMOD_CHANNEL* channel = nullptr; 46 46 FMOD_RESULT result = FMOD_System_PlaySound( system, FMOD_CHANNEL_FREE, sample, true, &channel ); … … 64 64 if ( info ) 65 65 { 66 FMOD_SYSTEM* system = (FMOD_SYSTEM*)m_system;67 FMOD_SOUND* sample = (FMOD_SOUND*)( info->fmod_sound );66 FMOD_SYSTEM* system = static_cast<FMOD_SYSTEM*>( m_system ); 67 FMOD_SOUND* sample = static_cast<FMOD_SOUND*>( info->fmod_sound ); 68 68 FMOD_CHANNEL* channel = nullptr; 69 69 FMOD_RESULT result = FMOD_System_PlaySound( system, FMOD_CHANNEL_FREE, sample, true, &channel ); … … 90 90 nv::sound fmod::audio::load_sound( const string_view& a_path ) 91 91 { 92 FMOD_SYSTEM* system = (FMOD_SYSTEM*)m_system;92 FMOD_SYSTEM* system = static_cast<FMOD_SYSTEM*>( m_system ); 93 93 FMOD_SOUND* sample; 94 94 FMOD_RESULT fm_result = FMOD_System_CreateSound( system, a_path.data(), FMOD_3D, 0, &sample ); … … 109 109 if ( info ) 110 110 { 111 FMOD_Sound_Release( (FMOD_SOUND*)info->fmod_sound);111 FMOD_Sound_Release( static_cast<FMOD_SOUND*>( info->fmod_sound ) ); 112 112 m_sounds.destroy( a_sound ); 113 113 } … … 125 125 fmod_up.z = up.z; 126 126 // TODO: we also need to setup orientation! 127 FMOD_System_Set3DListenerAttributes( (FMOD_SYSTEM*)m_system, 0, 0, 0, &fmod_forward, &fmod_up );127 FMOD_System_Set3DListenerAttributes( static_cast<FMOD_SYSTEM*>( m_system ), 0, 0, 0, &fmod_forward, &fmod_up ); 128 128 } 129 129 … … 140 140 // fmod_up.z = 0.0f; 141 141 // TODO: we also need to setup orientation! 142 FMOD_System_Set3DListenerAttributes( (FMOD_SYSTEM*)m_system, 0, &fmod_position, 0, 0, 0 );143 FMOD_System_Update( (FMOD_SYSTEM*)m_system);142 FMOD_System_Set3DListenerAttributes( static_cast<FMOD_SYSTEM*>( m_system ), 0, &fmod_position, 0, 0, 0 ); 143 FMOD_System_Update( static_cast<FMOD_SYSTEM*>( m_system ) ); 144 144 } 145 145 … … 148 148 while ( m_sounds.size() > 0 ) 149 149 release( m_sounds.get_handle(0) ); 150 FMOD_System_Release( (FMOD_SYSTEM*)m_system);150 FMOD_System_Release( static_cast<FMOD_SYSTEM*>( m_system ) ); 151 151 } 152 152
Note: See TracChangeset
for help on using the changeset viewer.