1 /* $Id: c-api.h,v 1.1 2012/07/08 00:46:01 sarrazip Exp $ 2 3 flatzebra - SDL-based sound renderer 4 Copyright (C) 2011 Pierre Sarrazin <http://sarrazip.com/> 5 6 This program is free software; you can redistribute it and/or 7 modify it under the terms of the GNU General Public License 8 as published by the Free Software Foundation; either version 2 9 of the License, or (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public 17 License along with this program; if not, write to the Free 18 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 Boston, MA 02110-1301, USA. 20 */ 21 22 #pragma once 23 24 #include <stddef.h> 25 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 /* TODO: doc these functions */ 32 33 int flatzebra_sound_create(int rendererFreq); 34 35 void flatzebra_sound_destroy(); 36 37 void flatzebra_sound_setMasterVolume(float linVol); 38 39 int flatzebra_sound_requestSquareWave(float startFreq, 40 float endFreq, 41 float attackLevel, 42 float sustainLevel, 43 float attackTime, 44 float decayTime, 45 float sustainTime, 46 float releaseTime, 47 size_t loopCount); 48 49 //int flatzebra_sound_setSquareWaveFreq(int sqWaveHandle, float newWaveFreq); 50 51 int flatzebra_sound_requestWhiteNoise(float attackLevel, 52 float sustainLevel, 53 float attackTime, 54 float decayTime, 55 float sustainTime, 56 float releaseTime, 57 size_t loopCount); 58 59 int flatzebra_sound_isRequestAlive(int reqHandle); 60 61 int flatzebra_sound_pauseMainBus(); 62 63 int flatzebra_sound_resumeMainBus(); 64 65 #ifdef __cplusplus 66 } /* extern "C" */ 67 #endif 68