summaryrefslogtreecommitdiffstats
path: root/uisimulator/common
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2002-05-12 14:58:41 +0000
committerDave Chapman <dave@dchapman.com>2002-05-12 14:58:41 +0000
commitf07bfd0230069095831e5fe8ceb16fa6c82ae322 (patch)
tree3d54c54ebfcae97b29cf5815255ce61e0d77a305 /uisimulator/common
parenta1302f26db7f75bbab3f74bcc831d95d7a42b7c2 (diff)
downloadrockbox-f07bfd0230069095831e5fe8ceb16fa6c82ae322.tar.gz
rockbox-f07bfd0230069095831e5fe8ceb16fa6c82ae322.tar.bz2
rockbox-f07bfd0230069095831e5fe8ceb16fa6c82ae322.zip
moved sound interface to common directory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@558 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r--uisimulator/common/mpegplay.c2
-rw-r--r--uisimulator/common/sound.h42
2 files changed, 43 insertions, 1 deletions
diff --git a/uisimulator/common/mpegplay.c b/uisimulator/common/mpegplay.c
index 9af231088e..aaaddfa014 100644
--- a/uisimulator/common/mpegplay.c
+++ b/uisimulator/common/mpegplay.c
@@ -34,7 +34,7 @@
#include <stdio.h>
#include <mad.h>
-#include "oss_sound.h"
+#include "sound.h"
/* The "dither" code to convert the 24-bit samples produced by libmad was
taken from the coolplayer project - coolplayer.sourceforge.net */
diff --git a/uisimulator/common/sound.h b/uisimulator/common/sound.h
new file mode 100644
index 0000000000..4da5ce9f08
--- /dev/null
+++ b/uisimulator/common/sound.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ * Copyright (C) 2002 Dave Chapman
+ *
+ * sound.h - common sound driver file.
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef _SOUND_H
+#define _SOUND_H
+
+#ifdef LINUX
+
+/* The "sound device type" is simply the file descriptor */
+#define sound_t int
+
+#else
+ #ifdef WIN32
+ #warning "No sound yet in win32"
+ #else
+ #warning "No sound in this environment"
+ #endif
+#endif
+
+int init_sound(sound_t* sound);
+int config_sound(sound_t* sound, int sound_freq, int channels);
+void close_sound(sound_t* sound);
+int output_sound(sound_t* sound,const void* buf, int count);
+
+#endif