emux_voice.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #ifndef __EMUX_VOICE_H
  2. #define __EMUX_VOICE_H
  3. /*
  4. * A structure to keep track of each hardware voice
  5. *
  6. * Copyright (C) 1999 Steve Ratcliffe
  7. * Copyright (c) 1999-2000 Takashi Iwai <tiwai@suse.de>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23. #include <sound/driver.h>
  24. #include <linux/wait.h>
  25. #include <linux/sched.h>
  26. #include <sound/core.h>
  27. #include <sound/emux_synth.h>
  28. /* Prototypes for emux_seq.c */
  29. int snd_emux_init_seq(snd_emux_t *emu, snd_card_t *card, int index);
  30. void snd_emux_detach_seq(snd_emux_t *emu);
  31. snd_emux_port_t *snd_emux_create_port(snd_emux_t *emu, char *name, int max_channels, int type, snd_seq_port_callback_t *callback);
  32. void snd_emux_reset_port(snd_emux_port_t *port);
  33. int snd_emux_event_input(snd_seq_event_t *ev, int direct, void *private, int atomic, int hop);
  34. int snd_emux_inc_count(snd_emux_t *emu);
  35. void snd_emux_dec_count(snd_emux_t *emu);
  36. int snd_emux_init_virmidi(snd_emux_t *emu, snd_card_t *card);
  37. int snd_emux_delete_virmidi(snd_emux_t *emu);
  38. /* Prototypes for emux_synth.c */
  39. void snd_emux_init_voices(snd_emux_t *emu);
  40. void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
  41. void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
  42. void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
  43. void snd_emux_terminate_note(void *p, int note, snd_midi_channel_t *chan);
  44. void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
  45. void snd_emux_sounds_off_all(snd_emux_port_t *port);
  46. void snd_emux_update_channel(snd_emux_port_t *port, snd_midi_channel_t *chan, int update);
  47. void snd_emux_update_port(snd_emux_port_t *port, int update);
  48. void snd_emux_timer_callback(unsigned long data);
  49. /* emux_effect.c */
  50. #ifdef SNDRV_EMUX_USE_RAW_EFFECT
  51. void snd_emux_create_effect(snd_emux_port_t *p);
  52. void snd_emux_delete_effect(snd_emux_port_t *p);
  53. void snd_emux_clear_effect(snd_emux_port_t *p);
  54. void snd_emux_setup_effect(snd_emux_voice_t *vp);
  55. void snd_emux_send_effect_oss(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val);
  56. void snd_emux_send_effect(snd_emux_port_t *port, snd_midi_channel_t *chan, int type, int val, int mode);
  57. #endif
  58. /* emux_nrpn.c */
  59. void snd_emux_sysex(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
  60. int snd_emux_xg_control(snd_emux_port_t *port, snd_midi_channel_t *chan, int param);
  61. void snd_emux_nrpn(void *private_data, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
  62. /* emux_oss.c */
  63. void snd_emux_init_seq_oss(snd_emux_t *emu);
  64. void snd_emux_detach_seq_oss(snd_emux_t *emu);
  65. /* emux_proc.c */
  66. #ifdef CONFIG_PROC_FS
  67. void snd_emux_proc_init(snd_emux_t *emu, snd_card_t *card, int device);
  68. void snd_emux_proc_free(snd_emux_t *emu);
  69. #endif
  70. #define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
  71. /* emux_hwdep.c */
  72. int snd_emux_init_hwdep(snd_emux_t *emu);
  73. void snd_emux_delete_hwdep(snd_emux_t *emu);
  74. #endif