From 2d48d0ffa6baddd19e6ff077f25068f90af7be3d Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 8 Jun 2007 23:42:04 +0000 Subject: Straighten out some audio path APIs and misc. audio stuff. Having recording is not a prerequisite to having input/output source selection which is probably most useful when adding a audio input features like FM to a new port without forcing recording to be implemented first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13599 a1c6a512-1295-4272-9138-f99709370657 --- firmware/pcm_record.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'firmware/pcm_record.c') diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c index c27f80400d..1430100a09 100644 --- a/firmware/pcm_record.c +++ b/firmware/pcm_record.c @@ -480,6 +480,14 @@ void audio_record(const char *filename) logf("audio_record_done"); } /* audio_record */ +/** + * audio_record wrapper for API compatibility with HW codec + */ +void audio_new_file(const char *filename) +{ + audio_record(filename); +} /* audio_new_file */ + /** * Stop current recording if recording */ @@ -551,22 +559,6 @@ unsigned long audio_num_recorded_bytes(void) return num_rec_bytes; } /* audio_num_recorded_bytes */ -#ifdef HAVE_SPDIF_IN -/** - * Return SPDIF sample rate index in audio_master_sampr_list. Since we base - * our reading on the actual SPDIF sample rate (which might be a bit - * inaccurate), we round off to the closest sample rate that is supported by - * SPDIF. - */ -int audio_get_spdif_sample_rate(void) -{ - unsigned long measured_rate = spdif_measure_frequency(); - /* Find which SPDIF sample rate we're closest to. */ - return round_value_to_list32(measured_rate, audio_master_sampr_list, - SAMPR_NUM_FREQ, false); -} /* audio_get_spdif_sample_rate */ -#endif /* HAVE_SPDIF_IN */ - /***************************************************************************/ /* */ /* Functions that execute in the context of pcmrec_thread */ @@ -1756,7 +1748,7 @@ void enc_set_parameters(struct enc_parameters *params) fnq_size *= MAX_PATH; logf("fnq files:%ld", fnq_size / MAX_PATH); -#if 1 +#if 0 logf("ab :%08lX", (uintptr_t)audiobuf); logf("pcm:%08lX", (uintptr_t)pcm_buffer); logf("enc:%08lX", (uintptr_t)enc_buffer); -- cgit v1.2.3