audio-streaming

Android MediaRecorder is not generating a streamable AAC-LC audio using AudioEncoder.AAC

十年热恋 提交于 2019-12-12 14:08:25
问题 I am using a Nexus 7 with Android version 4.2+. So according to the Android Supported Media Formats all listed encoders and container formats are supported. Now I want to record an audio using the AAC-LC encoder and the MPEG-4 container format (file type). In the generated file, when I open it in an HEX-Editor, I see that the file is an ISO Base Media file having the isom File Type Box (Section 4.3) with the following compatible brands: isom and 3gp4 . The remaining of the file is mostly an

jQuery: Cross-browser problem — Debugging Internet Explorer

和自甴很熟 提交于 2019-12-12 12:19:22
问题 Update: The issue seems to be that due to the JavaScript that was written to acccomodate a problem with Firefox/flash, the program is now trying to play html5 in IE, which isn't working for IE 8 and earlier. However, if I put a javascript based html5 link in the header http://html5media.info/, the html5 players work in IE 8 but not in any workable way. All the players show at once and start playing automatically. Note, all my students are in Asia so the game sort of has to work in IE 8... I

Upload audio - http streaming

被刻印的时光 ゝ 提交于 2019-12-12 09:25:30
问题 I'm trying to upload a linear file under http in streaming mode. The idea is do this steps simultaneously, 1) Thread 1: record an audio file and store it in a temp file 2) Thread 2: Take n bytes from temp file and send it to an http server. How can I write an http stream?, On CFHTTPStream I did not see write methods, only read :s Do I need use sockets? Thanks!!! My actual code is CFWriteStreamRef stream; NSString *strUrl = @"myurl"; NSURL *url = [[[NSURL alloc] initWithString:strUrl] retain];

Sound wave from TargetDataLine

ぐ巨炮叔叔 提交于 2019-12-12 09:14:48
问题 Currently I am trying to record a sound wave from a mic and display amplitude values in realtime in Java. I came across Targetdataline but I am having a bit of trouble understanding I get data from it. Sample code from Oracle states: line = (TargetDataLine) AudioSystem.getLine(info); line.open(format, line.getBufferSize()); ByteArrayOutputStream out = new ByteArrayOutputStream(); int numBytesRead; byte[] data = new byte[line.getBufferSize() / 5]; // Begin audio capture. line.start(); // Here,

WebRTC Play Audio Input as Microphone

橙三吉。 提交于 2019-12-12 08:09:15
问题 I want to play my audio file as microphone input (without sending my live voice but my audio file) to the WebRTC connected user. Can anybody tell me how could it be done? I have done some following tries in the JS code, like: 1. base64 Audio <script> var base64string = "T2dnUwACAAAAAAA.."; var snd = new Audio("data:audio/wav;base64," + base64string); snd.play(); var Sound = (function () { var df = document.createDocumentFragment(); return function Sound(src) { var snd = new Audio(src); df

PHP script to extract artist & title from Shoutcast/Icecast stream

本小妞迷上赌 提交于 2019-12-12 07:13:26
问题 I found a script which can extract the artist & title name from an Icecast or Shoutcast stream. I want the script to update automatically when a song changed, at the moment its working only when i execute it. I'm new to PHP so any help will be appreciated. Thanks! define('CRLF', "\r\n"); class streaminfo{ public $valid = false; public $useragent = 'Winamp 2.81'; protected $headers = array(); protected $metadata = array(); public function __construct($location){ $errno = $errstr = ''; $t =

Play sound through earpiece when using MediaPlayer

对着背影说爱祢 提交于 2019-12-12 06:20:06
问题 I am playing voicemail recordings in my app. The way I currently have it set up, it plays the voicemail through the speakerphone. What is the best way to be able to toggle between speakerphone and earpiece. Here is how I set up my MediaPlayer: mediaPlayer = new MediaPlayer(); mediaPlayer.setOnPreparedListener(this); mediaPlayer.setOnCompletionListener(this); mediaPlayer.setOnErrorListener(this); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); try { mediaPlayer.setDataSource(url); }

parallel operations with audio stream c#

荒凉一梦 提交于 2019-12-12 05:58:22
问题 I record sound in c#(wpf) and when data from sound card is available it calls this event: void myWaveIn_DataAvailable(object sender, WaveInEventArgs e) { for (int index = 0; index < e.BytesRecorded; index += 2)//Here I convert in a loop the stream into floating number samples { short sample = (short)((e.Buffer[index + 1] << 8) | e.Buffer[index + 0]); samples32Queue.Enqueue(sample/32768f); } //***Do some Processing with data inside Queue } As you can see I push every sample from the recorded

While using next and previous functionality in AudioStreamer, two or more songs starts together

无人久伴 提交于 2019-12-12 04:28:29
问题 Here is the code for next and previous button - (IBAction)nextPressed:(id)sender { Previousbutton.enabled=YES; Nextbutton.enabled = NO; NSLog(@"TOTAL TRACK:%d",TotalTrackCount); // TrackCount = TotalTrackCount+1; if(selectedIndex+1 < TotalTrackCount) { [streamer stop]; [self performSelector:@selector(destroyStreamer) ] ; //player flag player=@"stop"; int new_index; new_index=selectedIndex+1; selectedIndex=new_index; str_AudioUrl=[array_audioUrl objectAtIndex:selectedIndex]; userPrefs =

HTTP range, streaming, music and audio

情到浓时终转凉″ 提交于 2019-12-12 03:43:44
问题 I have a website which I use to stream audio files. Mainly, MP3 & OGG. Since few months, I handle myself (PHP) the steaming part (before it was apache2). First I do a normal 200 OK response with sliced binary response of my multimedia audio files (for memory allocation). It's working fine, but I got the Infinity duration on all my audio. According to this question, I have updated yesterday the streaming part. And now, I have one of the strangest bug I could imagine. My refactor of code works