eas_synth_protos.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*----------------------------------------------------------------------------
  2. *
  3. * File:
  4. * eas_synth_protos.h
  5. *
  6. * Contents and purpose:
  7. * Declarations, interfaces, and prototypes for synth.
  8. *
  9. * Copyright Sonic Network Inc. 2004
  10. * Licensed under the Apache License, Version 2.0 (the "License");
  11. * you may not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS,
  18. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. *
  22. *----------------------------------------------------------------------------
  23. * Revision Control:
  24. * $Revision: 82 $
  25. * $Date: 2006-07-10 11:45:19 -0700 (Mon, 10 Jul 2006) $
  26. *----------------------------------------------------------------------------
  27. */
  28. #ifndef _EAS_SYNTH_PROTOS_H
  29. #define _EAS_SYNTH_PROTOS_H
  30. /* includes */
  31. #include "eas_data.h"
  32. #include "eas_sndlib.h"
  33. #ifdef _SPLIT_ARCHITECTURE
  34. typedef struct s_frame_interface_tag
  35. {
  36. EAS_BOOL (* EAS_CONST pfStartFrame)(EAS_FRAME_BUFFER_HANDLE pFrameBuffer);
  37. EAS_BOOL (* EAS_CONST pfEndFrame)(EAS_FRAME_BUFFER_HANDLE pFrameBuffer, EAS_I32 *pMixBuffer, EAS_I16 masterGain);
  38. } S_FRAME_INTERFACE;
  39. #endif
  40. /* generic synthesizer interface */
  41. typedef struct
  42. {
  43. EAS_RESULT (* EAS_CONST pfInitialize)(S_VOICE_MGR *pVoiceMgr);
  44. EAS_RESULT (* EAS_CONST pfStartVoice)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice, EAS_I32 voiceNum, EAS_U16 regionIndex);
  45. EAS_BOOL (* EAS_CONST pfUpdateVoice)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice, EAS_I32 voiceNum, EAS_I32 *pMixBuffer, EAS_I32 numSamples);
  46. void (* EAS_CONST pfReleaseVoice)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice, EAS_I32 voiceNum);
  47. void (* EAS_CONST pfMuteVoice)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice, EAS_I32 voiceNum);
  48. void (* EAS_CONST pfSustainPedal)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, S_SYNTH_VOICE *pVoice, S_SYNTH_CHANNEL *pChannel, EAS_I32 voiceNum);
  49. void (* EAS_CONST pfUpdateChannel)(S_VOICE_MGR *pVoiceMgr, S_SYNTH *pSynth, EAS_U8 channel);
  50. } S_SYNTH_INTERFACE;
  51. #endif