speaker

Sending audio to a bluetooth enabled speaker, IOS

为君一笑 提交于 2019-12-06 07:15:00
I want to add a function to my App, where the user can choose to play the audio on a bluetooth enabled speaker. I have a Parrot Easydrive in my car and this works for phonecalls and for example the Dictafoon App among others. I understand that I should use the Core Audio framework. WHen a bluetooth device is connected it is said that it is easy to stream the audio to that connection. I am now looking for Core Audio sample code (or a book) where connecting and streaming to a bluetooth device with Core Audio is explained. Can anyone shed a light on this? If there is another framework or sample

AVAudioSession : microphone headphone as input and iphone speaker as output

末鹿安然 提交于 2019-12-05 17:52:43
With iOS10 there are more possibilities to manage AUdioSession, but i couldn't manage to keep the headphone microphone as input while audio is going out through the iphone speaker. The 'overrideOutputAudioPort' method below also override the input audio port as the iphone microphone let session = AVAudioSession.sharedInstance() do { try session.setCategory(AVAudioSessionCategoryPlayAndRecord) try! session.overrideOutputAudioPort(.speaker) } catch { } Is there any solution to keep the headphone as input? How I undeerstand this Apple documentation , this is not possible using AVAudioSession : If

Play audio trough phone speaker of an android device

我的未来我决定 提交于 2019-12-05 08:53:10
Is it possible to play audio trough the phone speaker of an android device? The smaller speaker inside a phone that produces a low volume sound which can only be heard when listing closely with your ear against the phone. Hopefully my description is clear enough to understand my question. If it is possible, a example for how to accomplish this would be really helpful. EDIT Currently i'm using the following code to initialize my MediaPlayer. mediaPlayer = new MediaPlayer(); mediaPlayer.setOnBufferingUpdateListener(this); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setAudioStreamType

MATLAB code for a lot of Gaussian Mixture Model

泪湿孤枕 提交于 2019-12-04 15:17:49
I have applied gaussmix function in voicebox MATLAB tools to calculate GMM. However, the code gives me error when I run it for 512 GMM components. No_of_Clusters = 512; No_of_Iterations = 10; [m_ubm1,v_ubm1,w_ubm1]=gaussmix(feature,[],No_of_Iterations,No_of_Clusters); Error using * Inner matrix dimensions must agree. Error in gaussmix (line 256) pk=px*wt; % pk(k,1) effective number of data points for each mixture (could be zero due to underflow) I need 1024 or 2048 Mixtures for Universal Background Model (UBM) construction. Could anyone give me matlab code to calculate GMM for big number of

iOS: Is it possible to send audio out both headphones and speakers at the same time?

不羁岁月 提交于 2019-12-04 05:12:52
We're looking to send some serial data out from the headphone jack, but would like to still be able to play audio from the speakers. Is it possible to send output to both? If so, is it possible to send different audio to each? Not as far as I'm aware. You can get programatic notification of when the routing has changed (i.e. when someone connects a headphone cable), but you are unable to specify which device(s) to use for output. 来源: https://stackoverflow.com/questions/10215923/ios-is-it-possible-to-send-audio-out-both-headphones-and-speakers-at-the-same-t

AVAudioPlayer via Speakers

倖福魔咒の 提交于 2019-12-03 04:42:16
I got the following code: - (id)init { if (self = [super init]) { UInt32 sessionCategory = kAudioSessionCategory_MediaPlayback; AudioSessionSetProperty(kAudioSessionProperty_AudioCategory, sizeof(sessionCategory), &sessionCategory); UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute,sizeof (audioRouteOverride),&audioRouteOverride); [[AVAudioSession sharedInstance] setDelegate:self]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; [[AVAudioSession sharedInstance]

how to play sound from microphone to speaker directly on android?

懵懂的女人 提交于 2019-12-03 04:32:49
问题 in my application, I need to direct sound from microphone directly to speaker. No other actions. I found a way to direct sound from microphone to earpiece by playing a file and setting speaker off. So I guess speaker can work similarly. However I don' know how to get rid of the playing file thing. Thank you. speaker() { m_audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); m_audioManager.setSpeakerphoneOn(true); // not needed I think //m_audioManager.setRouting(AudioManager

how to play sound from microphone to speaker directly on android?

柔情痞子 提交于 2019-12-02 17:43:14
in my application, I need to direct sound from microphone directly to speaker. No other actions. I found a way to direct sound from microphone to earpiece by playing a file and setting speaker off. So I guess speaker can work similarly. However I don' know how to get rid of the playing file thing. Thank you. speaker() { m_audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); m_audioManager.setSpeakerphoneOn(true); // not needed I think //m_audioManager.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL); earpiece need this?

Mic input to the speaker output on an iOS device?

亡梦爱人 提交于 2019-12-01 23:47:02
How can I redirect the mic input to the speaker output on an iOS device? I know it feedbacks overtime, but how can I do it in code? See aurioTouch sample from Apple. That does exactly what you want. I.e. it plays the input directly out as it comes in. 来源: https://stackoverflow.com/questions/8076850/mic-input-to-the-speaker-output-on-an-ios-device

How to detect alarm ringing or other apps using speaker? [closed]

岁酱吖の 提交于 2019-11-28 09:30:13
I am developing a music app. I want to detect that other apps using speaker or alarm ringing for play/pause music. For phone call i use PhoneStateListener. I tryed OnAudioFocusChangeListener for to detect other audios. But didn't work. I wondering how to solve this problem. I solved my problem for default alarm application: public static final String ALARM_ALERT_ACTION = "com.android.deskclock.ALARM_ALERT"; public static final String ALARM_SNOOZE_ACTION = "com.android.deskclock.ALARM_SNOOZE"; public static final String ALARM_DISMISS_ACTION = "com.android.deskclock.ALARM_DISMISS"; public static