之前到达Android中的扬声器(记录它,不使用麦克风)录制声音 [英] Record sound before it reaches the speaker (record it, not using the mic) in Android

查看:1322
本文介绍了之前到达Android中的扬声器(记录它,不使用麦克风)录制声音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此​​,这里是交易,我有一个应用程序,你可以用它来制作音乐。您preSS按钮,并播放声音。目前我使用默认的Andr​​oid API进行录音,这需要声音从扬声器,通过麦克风录制,然后将其保存到任何格式我想在记忆中。这个过程产生* .MP3质量非常差。

So here is the deal, i have an app that you can use to make music. You press buttons and it plays sounds. Currently i am using default android api for sound recording, which takes the sound from the speaker, records it via the microphone, and then saves it to whatever format I want in the memory. This process produces *.mp3 with very poor quality.

我想之前到达扬声器捕捉声音,记录它,然后。有点像广播录音的应用程序。任何想法和/或链接将大大AP preciated,谢谢!

I want to catch the sound before it reaches the speaker and record it then. Something like the radio recording apps. Any ideas and/or links would be greatly appreciated, thank you!

推荐答案

您不能使用MediaRecorder / AudioRecord这一点,因为没有办法在Android中,指定作为输入的记录音频输出。该方法收音机录音机工作(如果你在谈论调频收音机,而不是数字广播)是一个(非标)输入设备已被添加在那里你可以读取的音频数据的调频收音机芯片的到来。至少有一些厂商做到这一点。

You can't use MediaRecorder/AudioRecord for this, because there's no way in Android to specify an audio output as an input for a recorder. The way the radio recorders work (if you're talking about FM-radio, and not digital radio) is that a (non-standard) input device has been added from where you can read audio data coming from the FM-radio chip. At least some vendors do this.

由于要保存只是你的应用程序的输出(而不是在手机上运行的任何应用程序),它可以采取一切你发送音频到您的AudioTrack / MediaPlayer的做,也把它写入一个文件在同一时间。您可能需要,如果你同时播放多个声音第一混合声音。如果你的声音是不是原始的PCM你也必须考虑你的应用程序进行解码的照顾。

Since you want to save the output of just your app (and not any app running on the phone) it's possible to do by taking all the audio you send to your AudioTrack/MediaPlayer and also write it to a file at the same time. You might have to mix the sounds first if you play multiple sounds simultaneously. And if your sounds aren't raw PCM you'll also have to take care of decoding them in your app.

这篇关于之前到达Android中的扬声器(记录它,不使用麦克风)录制声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆