media-player

How to mute Microphone when recording from headset

北战南征 提交于 2020-01-23 17:06:07
问题 I am making a application to record audio from bluetooth headset. After that, the signal sound from headset will be played in to speaker of android phone. However, my problem is that some signal from microphone of android phone is also played. I want to mute microphone of android during playing. Is it possible. I am refering some link but it does not useful. Please give me one solution to turn of my microphone. This is my setting _audioManager = (AudioManager) getSystemService(Context.AUDIO

How to mute Microphone when recording from headset

倾然丶 夕夏残阳落幕 提交于 2020-01-23 17:03:02
问题 I am making a application to record audio from bluetooth headset. After that, the signal sound from headset will be played in to speaker of android phone. However, my problem is that some signal from microphone of android phone is also played. I want to mute microphone of android during playing. Is it possible. I am refering some link but it does not useful. Please give me one solution to turn of my microphone. This is my setting _audioManager = (AudioManager) getSystemService(Context.AUDIO

Android MediaPlayer stuck in prepare()

穿精又带淫゛_ 提交于 2020-01-23 06:47:50
问题 I'm facing a serious problem with the Media Player(MP) being stuck at the prepare() method. My app runs prepare() in an AsyncTask to avoid blocking the UI, since the sources are from the web. There are several 'play' buttons that the user can click at any time, so I added the prepare() inside a synchronized method to better control the state of the MP. My app also call a release() onPause to free the used resources. Thing is, I noticed that if release() is called while preparing, prepare()

Android MediaPlayer stuck in prepare()

与世无争的帅哥 提交于 2020-01-23 06:45:28
问题 I'm facing a serious problem with the Media Player(MP) being stuck at the prepare() method. My app runs prepare() in an AsyncTask to avoid blocking the UI, since the sources are from the web. There are several 'play' buttons that the user can click at any time, so I added the prepare() inside a synchronized method to better control the state of the MP. My app also call a release() onPause to free the used resources. Thing is, I noticed that if release() is called while preparing, prepare()

Stream an audio .pls in android

痴心易碎 提交于 2020-01-21 05:17:09
问题 I'm making an radio like application that uses streaming. Here i need to stream the audio from a link ( http://somedomain/some.pls ). I have created MediaPlayer and know how to play from an audio file. But don't know how to stream it from net. EDIT : logcat i got while i used the following code MediaPlayer mp = new MediaPlayer(); mp.setDataSource(http://somedomain/some.pls); mp.prepare(); mp.start() By log tag **MediaPlayer** 02-15 05:50:11.761: VERBOSE/MediaPlayer(23715): constructor 02-15

Android Audio SeekBar

China☆狼群 提交于 2020-01-21 03:16:05
问题 I'm trying to create something where a single audio file is played and can be paused and manipulated with a progress/seek bar. I want to have an image taking up most of the screen and then a play pause button on the bottom left and the bar to the right of the button. Everything works the seekbar which isn't link to the audio. My progress bar coding is a probably a mess because if taken it from several i've seen on the internet but they are mostly confusing for me as they are for music player

need help in MediaPlayer class

你离开我真会死。 提交于 2020-01-17 05:12:29
问题 I've recently trying to build a simple android project. It will play a sound when the user click a button. When it was successfully compiled, the sound won't come off. I think it is the source code, but I don't know where the mistakes are Here is my source code : package com.jason.shootemup; import java.util.Random; import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget

In UWP saving HTML5 Audio stream to mp3 file

自闭症网瘾萝莉.ら 提交于 2020-01-16 13:18:32
问题 I currently have a radio streaming App in the Windows 10 Store. Now I want to give my users the possibility to record the current stream to a mp3 File. Does anyone of you have a suggestion on how to save the Audio Stream? I can't find the property or event that gives me the bytes to save them. I'm using the Windows.Media.Playback.Mediaplayer class. Thanks in advance Christian 回答1: In general you could not get Audio Stream from Mediaplayer directly. However, you could monitor the audio via

Android webview video to play in mediaplayer

我怕爱的太早我们不能终老 提交于 2020-01-14 05:05:14
问题 I'm currently building an app which shows a content with html tags. The content has a HTML5 video tag which shows video from an external source. By using webview.loadDataWithBaseURL(), I load the html page. The webview shows the video along with the controls (play, stop, etc.). What I want to do is when I clicked the video, it will fire the android default mediaplayer intent downloading and playing the video source, not playing the video inline with the webview By which way to achieve this

Android MediaPlayer error -1004 (ERROR_IO)

你说的曾经没有我的故事 提交于 2020-01-13 13:10:09
问题 My application plays audio stream Here the code: MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setDataSource(url); mediaPlayer.prepare(); mediaPlayer.start(); url is local file (127.0.0.1) I use my own HttpServer which runs on the same phone. After call to mediaPlayer.prepare(); I get the error: error (1, -1004) which is ERROR_IO Any idea what is this error? Thanks, Costa. 回答1: the problem is php5 which sends a 500 http