Add mac audio capture

- Add CoreAudio device input capture for mac audio capturing.  The code
   should cover just about everything for capturing mac input device
   audio.  Because of the way mac audio is designed, users may have no
   choice but to obtain the open source soundflower software to capture
   their mac's desktop audio.  It may be necessary for us to distribute
   it with the program as well.

 - Hide event backend

 - Use win32 events for windows

 - Allow timed waits for events

 - Fix a few warnings
This commit is contained in:
jp9000
2014-02-26 22:43:31 -08:00
parent a1a1f1a64c
commit 33dc028c7e
15 changed files with 969 additions and 97 deletions

View File

@@ -28,7 +28,7 @@ static void *sinewave_thread(void *pdata)
double cos_val = 0.0;
uint8_t bytes[480];
while (event_try(&swd->event) == EAGAIN) {
while (event_try(swd->event) == EAGAIN) {
if (!os_sleepto_ns(last_time += 10000000))
last_time = os_gettime_ns();
@@ -71,11 +71,11 @@ static void sinewave_destroy(void *data)
if (swd) {
if (swd->initialized_thread) {
void *ret;
event_signal(&swd->event);
event_signal(swd->event);
pthread_join(swd->thread, &ret);
}
event_destroy(&swd->event);
event_destroy(swd->event);
bfree(swd);
}
}