jack1 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.3KB

  1. /*
  2. Copyright � Grame, 2003.
  3. Copyright � Johnny Petrantoni, 2003.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. Grame Research Laboratory, 9, rue du Garet 69001 Lyon - France
  16. grame@rd.grame.fr
  17. Johnny Petrantoni, johnny@lato-b.com - Italy, Rome.
  18. 30-01-04, Johnny Petrantoni: first code of the coreaudio driver.
  19. */
  20. #ifndef __jack_coreaudio_driver_h__
  21. #define __jack_coreaudio_driver_h__
  22. #include <CoreAudio/CoreAudio.h>
  23. #include <AudioToolbox/AudioConverter.h>
  24. #include <AudioUnit/AudioUnit.h>
  25. #include <jack/types.h>
  26. #include <jack/hardware.h>
  27. #include <jack/driver.h>
  28. #include <jack/jack.h>
  29. #include <jack/internal.h>
  30. typedef struct {
  31. JACK_DRIVER_DECL struct _jack_engine *engine;
  32. jack_nframes_t frame_rate;
  33. jack_nframes_t frames_per_cycle;
  34. unsigned long user_nperiods;
  35. int capturing;
  36. int playing;
  37. channel_t playback_nchannels;
  38. channel_t capture_nchannels;
  39. jack_client_t *client;
  40. JSList *capture_ports;
  41. JSList *playback_ports;
  42. char capture_driver_name[256];
  43. char playback_driver_name[256];
  44. AudioUnit au_hal;
  45. AudioBufferList* input_list;
  46. AudioDeviceID device_id;
  47. int state;
  48. jack_nframes_t capture_frame_latency;
  49. jack_nframes_t playback_frame_latency;
  50. int xrun_detected;
  51. int null_cycle_occured;
  52. } coreaudio_driver_t;
  53. #define kVersion 01
  54. typedef UInt8 CAAudioHardwareDeviceSectionID;
  55. #define kAudioDeviceSectionInput ((CAAudioHardwareDeviceSectionID)0x01)
  56. #define kAudioDeviceSectionOutput ((CAAudioHardwareDeviceSectionID)0x00)
  57. #define kAudioDeviceSectionGlobal ((CAAudioHardwareDeviceSectionID)0x00)
  58. #define kAudioDeviceSectionWildcard ((CAAudioHardwareDeviceSectionID)0xFF)
  59. #endif /* __jack_coreaudio_driver_h__ */