From: <man...@us...> - 2013-05-21 14:37:50
|
Revision: 2158 http://sourceforge.net/p/modplug/code/2158 Author: manxorist Date: 2013-05-21 14:37:42 +0000 (Tue, 21 May 2013) Log Message: ----------- [Ref] Rename back_left and back_right to rear_left and rear_right in libopenmpt API. Modified Paths: -------------- trunk/OpenMPT/libopenmpt/libopenmpt.h trunk/OpenMPT/libopenmpt/libopenmpt.hpp trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/libopenmpt/libopenmpt.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-05-21 14:37:42 UTC (rev 2158) @@ -101,10 +101,10 @@ LIBOPENMPT_API size_t openmpt_module_read_mono( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * mono ); LIBOPENMPT_API size_t openmpt_module_read_stereo( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * left, int16_t * right ); -LIBOPENMPT_API size_t openmpt_module_read_quad( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * left, int16_t * right, int16_t * back_left, int16_t * back_right ); +LIBOPENMPT_API size_t openmpt_module_read_quad( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * left, int16_t * right, int16_t * rear_left, int16_t * rear_right ); LIBOPENMPT_API size_t openmpt_module_read_float_mono( openmpt_module * mod, int32_t samplerate, size_t count, float * mono ); LIBOPENMPT_API size_t openmpt_module_read_float_stereo( openmpt_module * mod, int32_t samplerate, size_t count, float * left, float * right ); -LIBOPENMPT_API size_t openmpt_module_read_float_quad( openmpt_module * mod, int32_t samplerate, size_t count, float * left, float * right, float * back_left, float * back_right ); +LIBOPENMPT_API size_t openmpt_module_read_float_quad( openmpt_module * mod, int32_t samplerate, size_t count, float * left, float * right, float * rear_left, float * rear_right ); LIBOPENMPT_API double openmpt_module_get_current_position_seconds( openmpt_module * mod ); Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-05-21 14:37:42 UTC (rev 2158) @@ -142,10 +142,10 @@ std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * mono ); std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right ); - std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * back_left, std::int16_t * back_right ); + std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * rear_left, std::int16_t * rear_right ); std::size_t read( std::int32_t samplerate, std::size_t count, float * mono ); std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right ); - std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * back_left, float * back_right ); + std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * rear_left, float * rear_right ); double get_current_position_seconds() const; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-05-21 14:37:42 UTC (rev 2158) @@ -455,10 +455,10 @@ } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; } -size_t openmpt_module_read_quad( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * left, int16_t * right, int16_t * back_left, int16_t * back_right ) { +size_t openmpt_module_read_quad( openmpt_module * mod, int32_t samplerate, size_t count, int16_t * left, int16_t * right, int16_t * rear_left, int16_t * rear_right ) { try { OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); - return mod->impl->read( samplerate, count, left, right, back_left, back_right ); + return mod->impl->read( samplerate, count, left, right, rear_left, rear_right ); } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; } @@ -476,10 +476,10 @@ } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; } -size_t openmpt_module_read_float_quad( openmpt_module * mod, int32_t samplerate, size_t count, float * left, float * right, float * back_left, float * back_right ) { +size_t openmpt_module_read_float_quad( openmpt_module * mod, int32_t samplerate, size_t count, float * left, float * right, float * rear_left, float * rear_right ) { try { OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod ); - return mod->impl->read( samplerate, count, left, right, back_left, back_right ); + return mod->impl->read( samplerate, count, left, right, rear_left, rear_right ); } OPENMPT_INTERFACE_CATCH_TO_LOG; return 0; } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-05-21 14:37:42 UTC (rev 2158) @@ -138,8 +138,8 @@ std::size_t module::read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right ) { return impl->read( samplerate, count, left, right ); } -std::size_t module::read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * back_left, std::int16_t * back_right ) { - return impl->read( samplerate, count, left, right, back_left, back_right ); +std::size_t module::read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * rear_left, std::int16_t * rear_right ) { + return impl->read( samplerate, count, left, right, rear_left, rear_right ); } std::size_t module::read( std::int32_t samplerate, std::size_t count, float * mono ) { return impl->read( samplerate, count, mono ); @@ -147,8 +147,8 @@ std::size_t module::read( std::int32_t samplerate, std::size_t count, float * left, float * right ) { return impl->read( samplerate, count, left, right ); } -std::size_t module::read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * back_left, float * back_right ) { - return impl->read( samplerate, count, left, right, back_left, back_right ); +std::size_t module::read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * rear_left, float * rear_right ) { + return impl->read( samplerate, count, left, right, rear_left, rear_right ); } double module::get_current_position_seconds() const { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-05-21 14:37:42 UTC (rev 2158) @@ -400,8 +400,8 @@ m_currentPositionSeconds += static_cast<double>( count ) / static_cast<double>( samplerate ); return count; } - std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * back_left, std::int16_t * back_right ) { - if ( !left || !right || !back_left || !back_right ) { + std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * rear_left, std::int16_t * rear_right ) { + if ( !left || !right || !rear_left || !rear_right ) { throw openmpt::exception_message("null pointer"); } apply_mixer_settings( samplerate, 4, SampleFormatInt16 ); @@ -410,8 +410,8 @@ for ( std::size_t i = 0; i < count; ++i ) { left[i] = m_int16Buffer[i*4+0]; right[i] = m_int16Buffer[i*4+1]; - back_left[i] = m_int16Buffer[i*4+2]; - back_right[i] = m_int16Buffer[i*4+3]; + rear_left[i] = m_int16Buffer[i*4+2]; + rear_right[i] = m_int16Buffer[i*4+3]; } m_currentPositionSeconds += static_cast<double>( count ) / static_cast<double>( samplerate ); return count; @@ -443,8 +443,8 @@ m_currentPositionSeconds += static_cast<double>( count ) / static_cast<double>( samplerate ); return count; } - std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * back_left, float * back_right ) { - if ( !left || !right || !back_left || !back_right ) { + std::size_t read( std::int32_t samplerate, std::size_t count, float * left, float * right, float * rear_left, float * rear_right ) { + if ( !left || !right || !rear_left || !rear_right ) { throw openmpt::exception_message("null pointer"); } apply_mixer_settings( samplerate, 4, SampleFormatFloat32 ); @@ -453,8 +453,8 @@ for ( std::size_t i = 0; i < count; ++i ) { left[i] = m_floatBuffer[i*4+0]; right[i] = m_floatBuffer[i*4+1]; - back_left[i] = m_floatBuffer[i*4+2]; - back_right[i] = m_floatBuffer[i*4+3]; + rear_left[i] = m_floatBuffer[i*4+2]; + rear_right[i] = m_floatBuffer[i*4+3]; } m_currentPositionSeconds += static_cast<double>( count ) / static_cast<double>( samplerate ); return count; Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-05-20 20:17:49 UTC (rev 2157) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-05-21 14:37:42 UTC (rev 2158) @@ -420,13 +420,13 @@ std::vector<Tsample> left( bufsize ); std::vector<Tsample> right( bufsize ); - std::vector<Tsample> back_left( bufsize ); - std::vector<Tsample> back_right( bufsize ); + std::vector<Tsample> rear_left( bufsize ); + std::vector<Tsample> rear_right( bufsize ); std::vector<Tsample*> buffers( 4 ) ; buffers[0] = left.data(); buffers[1] = right.data(); - buffers[2] = back_left.data(); - buffers[3] = back_right.data(); + buffers[2] = rear_left.data(); + buffers[3] = rear_right.data(); buffers.resize( flags.channels ); while ( true ) { @@ -436,7 +436,7 @@ switch ( flags.channels ) { case 1: count = mod.read( flags.samplerate, bufsize, left.data() ); break; case 2: count = mod.read( flags.samplerate, bufsize, left.data(), right.data() ); break; - case 4: count = mod.read( flags.samplerate, bufsize, left.data(), right.data(), back_left.data(), back_right.data() ); break; + case 4: count = mod.read( flags.samplerate, bufsize, left.data(), right.data(), rear_left.data(), rear_right.data() ); break; } if ( count == 0 ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |