forked from len0rd/rockbox
Restore changes of r25809 that got lost in the target tree movement and fix simulator build on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26120 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
36e52604b0
commit
86e19dd65d
2 changed files with 8 additions and 3 deletions
|
@ -34,6 +34,9 @@
|
||||||
#include "pcm.h"
|
#include "pcm.h"
|
||||||
#include "pcm_sampr.h"
|
#include "pcm_sampr.h"
|
||||||
|
|
||||||
|
/*#define LOGF_ENABLE*/
|
||||||
|
#include "logf.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
extern bool debug_audio;
|
extern bool debug_audio;
|
||||||
|
@ -49,7 +52,7 @@ static size_t pcm_data_size;
|
||||||
static size_t pcm_sample_bytes;
|
static size_t pcm_sample_bytes;
|
||||||
static size_t pcm_channel_bytes;
|
static size_t pcm_channel_bytes;
|
||||||
|
|
||||||
struct pcm_udata
|
static struct pcm_udata
|
||||||
{
|
{
|
||||||
Uint8 *stream;
|
Uint8 *stream;
|
||||||
Uint32 num_in;
|
Uint32 num_in;
|
||||||
|
@ -124,7 +127,7 @@ size_t pcm_get_bytes_waiting(void)
|
||||||
return pcm_data_size;
|
return pcm_data_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_to_soundcard(struct pcm_udata *udata)
|
static void write_to_soundcard(struct pcm_udata *udata)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (debug_audio && (udata->debug == NULL)) {
|
if (debug_audio && (udata->debug == NULL)) {
|
||||||
|
@ -214,8 +217,9 @@ void write_to_soundcard(struct pcm_udata *udata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len)
|
static void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len)
|
||||||
{
|
{
|
||||||
|
logf("sdl_audio_callback: len %d, pcm %d\n", len, pcm_data_size);
|
||||||
udata->stream = stream;
|
udata->stream = stream;
|
||||||
|
|
||||||
/* Write what we have in the PCM buffer */
|
/* Write what we have in the PCM buffer */
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include "system-sdl.h"
|
#include "system-sdl.h"
|
||||||
#include "thread-sdl.h"
|
#include "thread-sdl.h"
|
||||||
#include "sim-ui-defines.h"
|
#include "sim-ui-defines.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue