diff options
author | Michiel Van Der Kolk <not.valid@email.address> | 2005-03-20 23:06:47 +0000 |
---|---|---|
committer | Michiel Van Der Kolk <not.valid@email.address> | 2005-03-20 23:06:47 +0000 |
commit | b045f00d217c11c1ecf6635fdbf18d5f20a109f4 (patch) | |
tree | ebe936c7c2ad629e799fb1821d3aab70c18d81e8 | |
parent | 457e138fffa060e6199c53ec929cd97dfb42464c (diff) | |
download | rockbox-b045f00d217c11c1ecf6635fdbf18d5f20a109f4.tar.gz rockbox-b045f00d217c11c1ecf6635fdbf18d5f20a109f4.zip |
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
-rw-r--r-- | apps/plugins/rockboy/Makefile | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/main.c | 2 | ||||
-rw-r--r-- | apps/plugins/rockboy/rbsound.c (renamed from apps/plugins/rockboy/nosound.c) | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/apps/plugins/rockboy/Makefile b/apps/plugins/rockboy/Makefile index c24a325820..020d67bec8 100644 --- a/apps/plugins/rockboy/Makefile +++ b/apps/plugins/rockboy/Makefile | |||
@@ -19,7 +19,7 @@ endif | |||
19 | LINKFILE := $(OBJDIR)/link.lds | 19 | LINKFILE := $(OBJDIR)/link.lds |
20 | DEPFILE = $(OBJDIR)/dep-rockboy | 20 | DEPFILE = $(OBJDIR)/dep-rockboy |
21 | SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \ | 21 | SRC = cpu.c emu.c events.c exports.c fastmem.c hw.c lcd.c lcdc.c loader.c \ |
22 | main.c mem.c nosound.c rccmds.c rcvars.c rtc.c save.c sound.c split.c \ | 22 | main.c mem.c rbsound.c rccmds.c rcvars.c rtc.c save.c sound.c split.c \ |
23 | sys_rockbox.c rockboy.c menu.c | 23 | sys_rockbox.c rockboy.c menu.c |
24 | 24 | ||
25 | #CFLAGS += -DGRAYSCALE | 25 | #CFLAGS += -DGRAYSCALE |
diff --git a/apps/plugins/rockboy/main.c b/apps/plugins/rockboy/main.c index 77e9bc9ea0..175ae78d86 100644 --- a/apps/plugins/rockboy/main.c +++ b/apps/plugins/rockboy/main.c | |||
@@ -75,7 +75,7 @@ int gnuboy_main(char *rom) | |||
75 | // FIXME - make interface modules responsible for atexit() | 75 | // FIXME - make interface modules responsible for atexit() |
76 | PUTS("Init video"); | 76 | PUTS("Init video"); |
77 | vid_init(); | 77 | vid_init(); |
78 | PUTS("Init sound (nosound)"); | 78 | PUTS("Init sound"); |
79 | pcm_init(); | 79 | pcm_init(); |
80 | PUTS("Loading rom"); | 80 | PUTS("Loading rom"); |
81 | loader_init(rom); | 81 | loader_init(rom); |
diff --git a/apps/plugins/rockboy/nosound.c b/apps/plugins/rockboy/rbsound.c index a0c9b17f15..6d1b24fd9a 100644 --- a/apps/plugins/rockboy/nosound.c +++ b/apps/plugins/rockboy/rbsound.c | |||
@@ -20,7 +20,8 @@ rcvar_t pcm_exports[] = | |||
20 | 20 | ||
21 | void pcm_init(void) | 21 | void pcm_init(void) |
22 | { | 22 | { |
23 | pcm.hz = 11025; | 23 | pcm.hz = 44100; |
24 | pcm.stereo = 1; | ||
24 | pcm.buf = buf; | 25 | pcm.buf = buf; |
25 | pcm.len = sizeof buf; | 26 | pcm.len = sizeof buf; |
26 | pcm.pos = 0; | 27 | pcm.pos = 0; |
@@ -33,8 +34,15 @@ void pcm_close(void) | |||
33 | 34 | ||
34 | int pcm_submit(void) | 35 | int pcm_submit(void) |
35 | { | 36 | { |
37 | #ifdef RBSOUND | ||
38 | rb->pcm_play_data(pcm.buf,pcm.pos,NULL); | ||
39 | while(rb->pcm_is_playing()); /* spinlock */ | ||
40 | pcm.pos = 0; | ||
41 | return 1; | ||
42 | #else | ||
36 | pcm.pos = 0; | 43 | pcm.pos = 0; |
37 | return 0; | 44 | return 0; |
45 | #endif | ||
38 | } | 46 | } |
39 | 47 | ||
40 | 48 | ||