00001 /* RageSoundUtil - simple utilities that operate on sound buffers */ 00002 00003 #ifndef RAGE_SOUND_UTIL_H 00004 #define RAGE_SOUND_UTIL_H 00005 00006 namespace RageSoundUtil 00007 { 00008 void Pan( int16_t *pBuffer, int iFrames, float fPos ); 00009 void Fade( int16_t *pBuffer, int iFrames, float fStartVolume, float fEndVolume ); 00010 void ConvertMonoToStereoInPlace( int16_t *pBuffer, int iFrames ); 00011 }; 00012 00013 #endif 00014 00015 /* 00016 * Copyright (c) 2002-2004 Glenn Maynard 00017 * All rights reserved. 00018 * 00019 * Permission is hereby granted, free of charge, to any person obtaining a 00020 * copy of this software and associated documentation files (the 00021 * "Software"), to deal in the Software without restriction, including 00022 * without limitation the rights to use, copy, modify, merge, publish, 00023 * distribute, and/or sell copies of the Software, and to permit persons to 00024 * whom the Software is furnished to do so, provided that the above 00025 * copyright notice(s) and this permission notice appear in all copies of 00026 * the Software and that both the above copyright notice(s) and this 00027 * permission notice appear in supporting documentation. 00028 * 00029 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00030 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00031 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00032 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00033 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00034 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00035 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00036 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00037 * PERFORMANCE OF THIS SOFTWARE. 00038 */ 00039