mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
moved sound interface to common directory
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@558 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a1302f26db
commit
f07bfd0230
4 changed files with 18 additions and 3 deletions
|
|
@ -34,7 +34,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <mad.h>
|
#include <mad.h>
|
||||||
|
|
||||||
#include "oss_sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
/* The "dither" code to convert the 24-bit samples produced by libmad was
|
/* The "dither" code to convert the 24-bit samples produced by libmad was
|
||||||
taken from the coolplayer project - coolplayer.sourceforge.net */
|
taken from the coolplayer project - coolplayer.sourceforge.net */
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002 Dave Chapman
|
* Copyright (C) 2002 Dave Chapman
|
||||||
*
|
*
|
||||||
* oss_sound - a sound driver for Linux (and others?) OSS audio
|
* sound.h - common sound driver file.
|
||||||
*
|
*
|
||||||
* All files in this archive are subject to the GNU General Public License.
|
* 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.
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
|
@ -18,11 +18,25 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _SOUND_H
|
||||||
|
#define _SOUND_H
|
||||||
|
|
||||||
|
#ifdef LINUX
|
||||||
|
|
||||||
/* The "sound device type" is simply the file descriptor */
|
/* The "sound device type" is simply the file descriptor */
|
||||||
#define sound_t int
|
#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 init_sound(sound_t* sound);
|
||||||
int config_sound(sound_t* sound, int sound_freq, int channels);
|
int config_sound(sound_t* sound, int sound_freq, int channels);
|
||||||
void close_sound(sound_t* sound);
|
void close_sound(sound_t* sound);
|
||||||
int output_sound(sound_t* sound,const void* buf, int count);
|
int output_sound(sound_t* sound,const void* buf, int count);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -45,6 +45,7 @@ UNAME := $(shell uname)
|
||||||
ifeq ($(UNAME),Linux)
|
ifeq ($(UNAME),Linux)
|
||||||
INCLUDES += -I/usr/X11R6/include
|
INCLUDES += -I/usr/X11R6/include
|
||||||
LIBDIRS = -L/usr/X11R6/lib
|
LIBDIRS = -L/usr/X11R6/lib
|
||||||
|
DEFINES += -DLINUX
|
||||||
else
|
else
|
||||||
LIBDIRS =
|
LIBDIRS =
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#include <linux/soundcard.h>
|
#include <linux/soundcard.h>
|
||||||
#include "oss_sound.h"
|
#include "../common/sound.h"
|
||||||
|
|
||||||
/* We want to use the "real" open in some cases */
|
/* We want to use the "real" open in some cases */
|
||||||
#undef open
|
#undef open
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue