audio-streaming

How to Play the online streaming radio in Android

你说的曾经没有我的故事 提交于 2019-12-05 23:58:03
问题 I am developing one application where i want to play live stream radio. I have an url using which i will stream the radio and play. I have a play button by clicking which i want to play the radio. For that, i have written some code which is not at all working. Here is my code: mp = new MediaPlayer(); try { mp.setOnPreparedListener(this); Log.d("Testing", "start111"); mp.setAudioStreamType(AudioManager.STREAM_MUSIC); String url="xxxxxx"; mp.setDataSource(url); mp.prepareAsync(); } catch

variable speed control for audio playback in the browser?

≯℡__Kan透↙ 提交于 2019-12-05 19:40:37
Is there a way to change the playback speed of audio in the browser? What is best to accomplish this task, html5 audio, or flash, or something else? Are there any specific libraries that would help with this? William Use the Web Audio API. In the following code I answered your other question. best way to loop audio in the browser? Modify the code in my answer above as follows for a playback speed example. Right below source.loop = loopOnOff; add source.playbackRate.value = 1; // change number to between 0.10 to 10 (or larger/smaller) to test. You can also run the html audio tag through the web

Audio will play in 3.2 sim but not in 4.x

送分小仙女□ 提交于 2019-12-05 14:15:21
This streaming audio app will play in 3.2 simulator, but not in 4.x sim or my 4.1 iPhone. The console logs are as follows: 4.0 Sim This GDB was configured as "x86_64-apple-darwin".Attaching to process 13237. [Switching to process 13237] 2010-11-15 19:54:49.606 Issues[13237:1c07] AddRunningClient starting device on non-zero client count 2010-11-15 19:55:16.220 Issues[13237:6307] AQMEIO_Base::DoStartIO: timeout 2010-11-15 19:55:16.498 Issues[13237:6307] AQMEDevice::StartIO: error -66681 2010-11-15 19:55:16.499 Issues[13237:6307] CA_UISoundClientBase::StartPlaying: AddRunningClient failed (status

Browser audio-playback fails when Accept-Ranges not set in http headers; WHY?

拥有回忆 提交于 2019-12-05 12:13:06
I recently discovered something (that surprises me) when opening an audio file in firefox or chrome. If I don't specify the HTTP response header "Accept-Ranges: bytes", firefox won't be able to determine the length of the ogg file (in seconds) before reaching the end in playback. Chrome will discover the length of the ogg file (in seconds), but the audio player appears to crash when it reaches the end, and refuses to re-play the file after the crash. Other browsers were not tested. Working Http response headers: HTTP/1.1 200 OK Accept-Ranges: bytes Content-Type: application/ogg Content-Length:

Need Android equivalent of AudioInputStream

旧时模样 提交于 2019-12-05 11:37:29
I'm trying to write an Android app that analyzes content from the user's music library. Let's assume that these are mp3 files on the SD drive, for starters. I'm able to find Java algorithms to analyze music files, but I can't find an API to read and decode the files (not play them. There's an API to play the files, and even classes for audio effects, but I don't see any way for an app to get to the decoded data from a music file. I can read from microphone. J2SE has a class AudoInputStream,but it's not part of Android. Any suggestions? My real purpose was to be able to look at the files in my

How to set pan in IOS Audio Unit Framework

穿精又带淫゛_ 提交于 2019-12-05 10:30:19
Hello stack overflow users, i want to change pan position using UISlided in my IOS application. i am upgrading whole app which is currently using AudioStreamer of Matt Gallagher To change the pan value in in AudioStreamer used below code. AudioQueueRef audioQueue; // defined in AudioStreamer.h file - (void)changePan:(float)newPan { OSStatus panErr = AudioQueueSetParameter( audioQueue, kAudioQueueParam_Pan, newPan); NSLog(@" setting pan: %ld", panErr); if( panErr ) NSLog(@"Error setting pan: %ld", panErr); } i am replacing AudioStreamer with StreamingKit which use AudioUnit if i will get some

Which protocol should I use for streaming audio (not live)? [closed]

淺唱寂寞╮ 提交于 2019-12-05 08:20:55
I'm trying to write a Python server that streams one requested mp3 file from start to end. (No live streaming) I'd like to have the functionality to play that stream with any media player (like VLC) and be able to change playback position. I've heard a lot about HTTP Streaming, but after reading a few wikipedia articles it seems to me that 'HTTP Streaming' is just an umbrella term for different streaming protocols such as RTSP / RTCP / RTP . Then I came across SHOUTcast which is a proprietary software (server!) for streaming media using its own protocol. Another existing server program which

InputStream won't close, or takes forever to

老子叫甜甜 提交于 2019-12-05 08:17:31
I'm attempting to download an external mp3 into internal storage. However, the files I'm attempting to download are big, so I'm trying to download them in 1MB chunks so that you can begin playing them while the rest is downloaded. Here's my stream code: InputStream is = null; OutputStream os = null; try { HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet( url ); HttpResponse response = client.execute( get ); MyLog.d( "Connection established" ); byte[] buffer = new byte[8192]; is = new BufferedInputStream( response.getEntity().getContent(), buffer.length ); os =

kAudioDevicePropertyBufferFrameSize replacement for iOS

久未见 提交于 2019-12-05 07:13:58
问题 I was trying to set up an audio unit to render the music (instead of Audio Queue.. which was too opaque for my purposes).. iOS doesn't have this property kAudioDevicePropertyBufferFrameSize .. any idea how I can derive this value to set up the buffer size of my IO unit? I found this post interesting.. it asks about the possibility of using a combination of kAudioSessionProperty_CurrentHardwareIOBufferDuration and kAudioSessionProperty_CurrentHardwareOutputLatency audio session properties to

Stream overlapping audio files to Chromecast Audio

醉酒当歌 提交于 2019-12-05 07:03:52
Short I would like to stream multiple overlapping audio files (some sound effects that play at certain random times). So kind of a generated audio stream that will NEVER repeat exactly the same way. Some audio files are looping, some are at specific times. Probably kind of realtime stream insertion would be good I guess. What is the best way to write such a server software? What protocols should be used for streaming that (I prefer over HTTP). I would probably want to expose an url for each configuration (tracks & timing of sound effects). Any pointers to code/libraries? Best if in any