Skip to content

Commit

Permalink
Initial work on new audio subsystem
Browse files Browse the repository at this point in the history
Only works on OS X right now
  • Loading branch information
andoma committed Nov 21, 2012
1 parent 517bc56 commit 5fad0bc
Show file tree
Hide file tree
Showing 17 changed files with 778 additions and 39 deletions.
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,7 @@ SRCS += src/text/fontstash.c
##############################################################
# Audio subsys
##############################################################
SRCS += src/audio/audio.c \
src/audio/audio_decoder.c \
src/audio/audio_fifo.c \
src/audio/audio_iec958.c \

SRCS-$(CONFIG_LIBASOUND) += src/audio/alsa/alsa_audio.c
SRCS-$(CONFIG_LIBPULSE) += src/audio/pulseaudio/pulseaudio.c
SRCS-$(CONFIG_LIBOGC) += src/audio/wii/wii_audio.c
SRCS-$(CONFIG_COREAUDIO) += src/audio/coreaudio/coreaudio.c
SRCS-$(CONFIG_PSL1GHT) += src/audio/ps3/ps3_audio.c
SRCS += src/audio/dummy/dummy_audio.c
SRCS += src/audio2/audio.c

##############################################################
# DVD
Expand Down
6 changes: 2 additions & 4 deletions configure.osx
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ echo >>${CONFIG_MAK} "LDFLAGS_cfg += -framework OpenGL"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -framework CoreVideo"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -weak_framework VideoDecodeAcceleration"

# CoreAudio
if enabled coreaudio; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -framework CoreAudio"
fi
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -framework CoreAudio"
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -framework AudioToolBox"

# Carbon, Remote Control Wrapper uses it
if enabled appleremote; then
Expand Down
10 changes: 10 additions & 0 deletions src/arch/osx/osx_app.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#import <AppKit/AppKit.h>
#import <CoreAudio/HostTime.h>

#include <sys/types.h>
#include <sys/sysctl.h>
Expand All @@ -34,6 +35,15 @@
static void mainloop_courier_init(void);


/**
*
*/
int64_t
showtime_get_avtime(void)
{
return AudioConvertHostTimeToNanos(AudioGetCurrentHostTime()) / 1000LL;
}

/**
*
*/
Expand Down
11 changes: 0 additions & 11 deletions src/audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,6 @@ static int audio_run = 1;
static hts_thread_t audio_thread_id;
audio_fifo_t af0, *thefifo;


/**
*
*/
int
audio_mode_prefer_float(void)
{
return audio_mode_current && audio_mode_current->am_float;
}


/**
*
*/
Expand Down
2 changes: 0 additions & 2 deletions src/audio/audio_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ extern prop_t *prop_mastervol, *prop_mastermute;

#define CLIP16(a) ((a) > 32767 ? 32767 : ((a) < -32768 ? -32768 : a))

int audio_mode_prefer_float(void);

/**
* Audio drivers
*/
Expand Down
Loading

0 comments on commit 5fad0bc

Please sign in to comment.