forked from len0rd/rockbox
Alpha sound driver for rockboy, should work in theory, but in practice,
it doesn't. disabled by default with a define. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6218 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
457e138fff
commit
b045f00d21
3 changed files with 11 additions and 3 deletions
|
@ -19,7 +19,7 @@ endif
|
||||||
LINKFILE := $(OBJDIR)/link.lds
|
LINKFILE := $(OBJDIR)/link.lds
|
||||||
DEPFILE = $(OBJDIR)/dep-rockboy
|
DEPFILE = $(OBJDIR)/dep-rockboy
|
||||||
SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \
|
SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \
|
||||||
main.c mem.c nosound.c rccmds.c rcvars.c rtc.c save.c sound.c split.c \
|
main.c mem.c rbsound.c rccmds.c rcvars.c rtc.c save.c sound.c split.c \
|
||||||
sys_rockbox.c rockboy.c menu.c
|
sys_rockbox.c rockboy.c menu.c
|
||||||
|
|
||||||
#CFLAGS += -DGRAYSCALE
|
#CFLAGS += -DGRAYSCALE
|
||||||
|
|
|
@ -75,7 +75,7 @@ int gnuboy_main(char *rom)
|
||||||
// FIXME - make interface modules responsible for atexit()
|
// FIXME - make interface modules responsible for atexit()
|
||||||
PUTS("Init video");
|
PUTS("Init video");
|
||||||
vid_init();
|
vid_init();
|
||||||
PUTS("Init sound (nosound)");
|
PUTS("Init sound");
|
||||||
pcm_init();
|
pcm_init();
|
||||||
PUTS("Loading rom");
|
PUTS("Loading rom");
|
||||||
loader_init(rom);
|
loader_init(rom);
|
||||||
|
|
|
@ -20,7 +20,8 @@ rcvar_t pcm_exports[] =
|
||||||
|
|
||||||
void pcm_init(void)
|
void pcm_init(void)
|
||||||
{
|
{
|
||||||
pcm.hz = 11025;
|
pcm.hz = 44100;
|
||||||
|
pcm.stereo = 1;
|
||||||
pcm.buf = buf;
|
pcm.buf = buf;
|
||||||
pcm.len = sizeof buf;
|
pcm.len = sizeof buf;
|
||||||
pcm.pos = 0;
|
pcm.pos = 0;
|
||||||
|
@ -33,8 +34,15 @@ void pcm_close(void)
|
||||||
|
|
||||||
int pcm_submit(void)
|
int pcm_submit(void)
|
||||||
{
|
{
|
||||||
|
#ifdef RBSOUND
|
||||||
|
rb->pcm_play_data(pcm.buf,pcm.pos,NULL);
|
||||||
|
while(rb->pcm_is_playing()); /* spinlock */
|
||||||
|
pcm.pos = 0;
|
||||||
|
return 1;
|
||||||
|
#else
|
||||||
pcm.pos = 0;
|
pcm.pos = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue