forked from len0rd/rockbox
Simulator: build recording code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27280 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bf83ac6240
commit
3982f1e932
8 changed files with 33 additions and 94 deletions
|
@ -161,9 +161,7 @@ dsp.c
|
|||
tdspeed.c
|
||||
#ifdef HAVE_RECORDING
|
||||
enc_config.c
|
||||
#ifndef SIMULATOR
|
||||
recorder/pcm_record.c
|
||||
#endif /* SIMULATOR */
|
||||
#endif
|
||||
eq.c
|
||||
#if defined(CPU_COLDFIRE)
|
||||
|
|
|
@ -167,7 +167,7 @@ struct codec_api ci = {
|
|||
__cyg_profile_func_exit,
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
|
||||
#ifdef HAVE_RECORDING
|
||||
false, /* stop_encoder */
|
||||
0, /* enc_codec_loaded */
|
||||
enc_get_inputs,
|
||||
|
@ -179,13 +179,13 @@ struct codec_api ci = {
|
|||
|
||||
/* file */
|
||||
(open_func)PREFIX(open),
|
||||
close,
|
||||
(read_func)read,
|
||||
PREFIX(close),
|
||||
(read_func)PREFIX(read),
|
||||
PREFIX(lseek),
|
||||
(write_func)write,
|
||||
(write_func)PREFIX(write),
|
||||
round_value_to_list32,
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
||||
/* new stuff at the end, sort into place next time
|
||||
the API gets incompatible */
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "thread.h"
|
||||
#endif
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
#if !defined(SIMULATOR) && defined(HAVE_RECORDING)
|
||||
#ifdef HAVE_RECORDING
|
||||
#include "pcm_record.h"
|
||||
#endif
|
||||
#include "dsp.h"
|
||||
|
@ -213,7 +213,7 @@ struct codec_api {
|
|||
void (*profile_func_exit)(void *this_fn, void *call_site);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
|
||||
#ifdef HAVE_RECORDING
|
||||
volatile bool stop_encoder;
|
||||
volatile int enc_codec_loaded; /* <0=error, 0=pending, >0=ok */
|
||||
void (*enc_get_inputs)(struct enc_inputs *inputs);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if CONFIG_CODEC == SWCODEC
|
||||
/* decoders */
|
||||
|
||||
vorbis.c
|
||||
mpa.c
|
||||
flac.c
|
||||
|
@ -32,12 +32,14 @@ au.c
|
|||
vox.c
|
||||
wav64.c
|
||||
tta.c
|
||||
#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
|
||||
|
||||
#ifdef HAVE_RECORDING
|
||||
|
||||
/* encoders */
|
||||
|
||||
aiff_enc.c
|
||||
mp3_enc.c
|
||||
wav_enc.c
|
||||
wavpack_enc.c
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "kernel.h"
|
||||
#include "logf.h"
|
||||
#include "thread.h"
|
||||
#include <string.h>
|
||||
#include "string-extra.h"
|
||||
#include "storage.h"
|
||||
#include "usb.h"
|
||||
#include "buffer.h"
|
||||
|
|
|
@ -691,7 +691,7 @@ void rec_init_recording_options(struct audio_recording_options *options)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if CONFIG_CODEC == SWCODEC && !defined (SIMULATOR)
|
||||
#if CONFIG_CODEC == SWCODEC
|
||||
void rec_set_source(int source, unsigned flags)
|
||||
{
|
||||
/* Set audio input source, power up/down devices */
|
||||
|
@ -701,7 +701,7 @@ void rec_set_source(int source, unsigned flags)
|
|||
peak_meter_playback((flags & SRCF_RECORDING) == 0);
|
||||
peak_meter_enable(true);
|
||||
}
|
||||
#endif /* CONFIG_CODEC == SWCODEC && !defined (SIMULATOR) */
|
||||
#endif /* CONFIG_CODEC == SWCODEC */
|
||||
|
||||
void rec_set_recording_options(struct audio_recording_options *options)
|
||||
{
|
||||
|
@ -2321,79 +2321,6 @@ void audio_beep(int duration)
|
|||
/* dummy */
|
||||
(void)duration;
|
||||
}
|
||||
|
||||
#ifdef SIMULATOR
|
||||
/* stubs for recording sim */
|
||||
void audio_init_recording(unsigned int buffer_offset)
|
||||
{
|
||||
buffer_offset = buffer_offset;
|
||||
}
|
||||
|
||||
void audio_close_recording(void)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned long pcm_rec_get_warnings(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long pcm_rec_sample_rate(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned long audio_recorded_time(void)
|
||||
{
|
||||
return 123;
|
||||
}
|
||||
|
||||
unsigned long audio_num_recorded_bytes(void)
|
||||
{
|
||||
return 5 * 1024 * 1024;
|
||||
}
|
||||
|
||||
void rec_set_source(int source, unsigned flags)
|
||||
{
|
||||
source = source;
|
||||
flags = flags;
|
||||
}
|
||||
|
||||
void audio_set_recording_options(struct audio_recording_options *options)
|
||||
{
|
||||
options = options;
|
||||
}
|
||||
|
||||
void audio_set_recording_gain(int left, int right, int type)
|
||||
{
|
||||
left = left;
|
||||
right = right;
|
||||
type = type;
|
||||
}
|
||||
|
||||
void audio_record(const char *filename)
|
||||
{
|
||||
filename = filename;
|
||||
}
|
||||
|
||||
void audio_new_file(const char *filename)
|
||||
{
|
||||
filename = filename;
|
||||
}
|
||||
|
||||
void audio_stop_recording(void)
|
||||
{
|
||||
}
|
||||
|
||||
void audio_pause_recording(void)
|
||||
{
|
||||
}
|
||||
|
||||
void audio_resume_recording(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* #ifdef SIMULATOR */
|
||||
#endif /* #ifdef CONFIG_CODEC == SWCODEC */
|
||||
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
|
|
@ -31,6 +31,10 @@
|
|||
#include "audiohw.h"
|
||||
#include "system.h"
|
||||
|
||||
#ifdef HAVE_RECORDING
|
||||
#include "audiohw.h"
|
||||
#endif
|
||||
|
||||
#include "pcm.h"
|
||||
#include "pcm_sampr.h"
|
||||
|
||||
|
@ -284,16 +288,19 @@ void pcm_rec_dma_stop(void)
|
|||
{
|
||||
}
|
||||
|
||||
unsigned long pcm_rec_status(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const void * pcm_rec_dma_get_peak_buffer(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void audiohw_set_recvol(int left, int right, int type)
|
||||
{
|
||||
(void)left;
|
||||
(void)right;
|
||||
(void)type;
|
||||
}
|
||||
|
||||
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
||||
void pcm_play_dma_init(void)
|
||||
|
|
|
@ -56,6 +56,11 @@ bool fat_ismounted(int volume)
|
|||
return true;
|
||||
}
|
||||
|
||||
int storage_spinup_time(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int storage_init(void)
|
||||
{
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue