audio-player

Not able to get getDuration() for AAC file using ExoPlayer

♀尐吖头ヾ 提交于 2019-12-17 14:58:42
问题 I have been trying to stream a URL using ExoPlayer . The URLs: STREAM_URL_1 = "http://storage.googleapis.com/exoplayer-test-media-0/play.mp3" STREAM_URL_2 = "https://s3-ap-southeast-1.amazonaws.com/ok.talk.channels/zakirkhan/Zakir+khan+-+when+my+father+took+my+gf%27s+call.aac" Both URLs play but I am not able to get the getDuration() for STREAM_URL_2 which is an .aac file. The .mp3 works. The following is how I do it. How do I get the getDuration() for the 2nd URL. Even seekTo() doesn't work

Sun, Audio-player and Sound I/O

我是研究僧i 提交于 2019-12-17 14:56:33
问题 I have a few questions related to Sun, Audio-player and Sound Input/Output Why is the sun.audio.AudioPlayer package not part of the Java API? Some info is here instead: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6b14/sun/audio/AudioPlayer.java Yet it is still part of the default JDK build I am using. I have tried using JMF and spent half the day screw balling around with it, to no real avail. I managed to import the jmf.jar into Eclipse I tried a demo script and it

How to start the default music player from my app?

强颜欢笑 提交于 2019-12-13 13:55:18
问题 I make a app with a ListView . When I tap on a ListView item, a .ogg soundfile should start playing. Not in my app, but in the default music player app of the user. How can I do this? 回答1: Try this Intent it = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.parse("file:///sdcard/song.mp3"); it.setDataAndType(uri, "audio/mp3"); startActivity(it); Or Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1"); Intent it = new Intent(Intent.ACTION_VIEW, uri); startActivity(it)

Android-Audio Recording

心已入冬 提交于 2019-12-13 06:44:18
问题 I would like to know The Audio Recording can be done within emulator It should be stored in some other place but not in SD card. 回答1: no that question is part of your other question... double post! please try to search first.... 来源: https://stackoverflow.com/questions/3493673/android-audio-recording

MediaElement is playing audio only in debug mode, its not playing audio without debug mode

时光毁灭记忆、已成空白 提交于 2019-12-13 05:47:23
问题 I am working on windows phone 8 trying to implement the audio playing feature in my app by creating the user control and media element. Surprisingly audio is playing during debugging but as i run the app without debug mode audio does not play, i tried the await and async methodology but thats also not working. MainPage.xaml.cs private async void AudioControl(string audioId, string audio_url) { customControlAudioPlayer.media_Id = audioId; customAudioPlayer.media_Url = audio_url; //Following

Does mciSendString must have “wait” in order to hear sound?

强颜欢笑 提交于 2019-12-12 13:15:55
问题 I'm trying to write a mp3 player using mci functions.(win 7 64bit,vs2010,c++) when i try to play a mp3 file with the flag "wait" i can hear the file but everything else is stuck until the file ends playing, if i remove the flag "wait" i can continue working but can't hear a thing. here is a sample of the code: unsigned long __stdcall PlayThread(void *myParam) { char* nameOfMp3 = (char*)myParam; char* cmd = new char[MAX_PATH]; sprintf(cmd,"open \"%s\" type MPEGvideo alias myFile",nameOfMp3);

How to get all .mp3 files from raw folder to custom array listview and play that song?

我的梦境 提交于 2019-12-12 07:01:42
问题 I am developing one app that can play .mp3 file.So,In this app i have created one custom listview adapter for populating the .mp3 files from raw folder to listview and created one model class and in my raw folder i have 20 .mp3 files.So, I want to add this all raw folder .mp3 files to listview in each row.after that when user click that particular listview item at that time play that song given position. Note: I am not importing that .mp3 files from SDCARD. Here this my adapter public class

Ho to use MediaElement with relative URL in Windows Phone 7.1?

被刻印的时光 ゝ 提交于 2019-12-12 05:49:29
问题 I proved everything but this code does not run in Windows Phone 7.1 private MediaElement media; private MediaElement media; // Costruttore public MainPage() { this.InitializeComponent(); media = new MediaElement(); media.Source = new Uri("Risorse/Brani/00 Mai 1771.mp3", UriKind.Relative); media.Play(); } The file I mentioned exists and no error is thrown... 回答1: The MediaElement control must be put into the visual tree. You can accomplish this by placing the element in xaml <MediaElement x

How to convert audio Mediastore Duration to minutes and seconds?

廉价感情. 提交于 2019-12-12 02:02:44
问题 I'm using the audio player tutorial from androidhive.info and in the SongsManager.java I'm trying to convert duration to minutes and seconds. I've managed to do it but I keep getting a NumberFormatException which I don't know how to deal with. Part of the code is here: public ArrayList<HashMap<String, String>> getPlayList(Context c) { String selectionMimeType = MediaStore.Files.FileColumns.MIME_TYPE + "=?"; /*use content provider to get beginning of database query that queries for all audio

Get youtube file URL from video ID using API

和自甴很熟 提交于 2019-12-12 01:25:00
问题 I want to reproduce all youtube files embedded on a site using SoundManager2 audio player. How can I get access to Youtube file URL from video ID? Note: Soundcloud offers the possibility to get the direct streaming URL from the song URL. Here is a working example with Soundmanager2 and Angular. Now I want to do the same for Youtube. 回答1: One slightly hacky way - You could use Youtube's OEmbed API, however you need to provide a URL, so you'd need to add the ID onto the end. https://www.youtube