media-player

Android Studio Mediaplayer how to fade in and out

為{幸葍}努か 提交于 2019-12-22 04:28:18
问题 I am working with the mediaplayer class in android studio. I simply want to fade out one sound and fade in the other sound instead of using setVolume(0,0) and setVolume(1,1). I have created two mediaplayers for this and it seemed like I found a solution in this thread: Android: How to create fade-in/fade-out sound effects for any music file that my app plays? but I don't know how to use deltaTime. There are also some other solutions to this, which I can barely understand. Isn't there an easy

java.io.IOException: setDataSource failed.: status=0x80000000

那年仲夏 提交于 2019-12-22 01:25:12
问题 I am trying to play url using media player in activity using: mediaPlayer = MediaPlayer.create(getApplicationContext(), Uri.parse("http://www.pocketjourney.com/downloads/pj/video/famous.3gp"), holder); It's working fine. Same code I use to set it as an live wallpaper in @onSurfaceCreated in WallpaperService , it's giving me following error log D/MediaPlayer( 4128): create failed: D/MediaPlayer( 4128): java.io.IOException: setDataSource failed.: status=0x80000000 D/MediaPlayer( 4128): at

Creating a notification for MediaPlayer with an Android Foreground Service

你说的曾经没有我的故事 提交于 2019-12-21 20:17:25
问题 Here is the problem. I am currently working on an application that must provide : A Radio Player (AAC live streaming from an url) And a PodCast player (MP3 Streaming from an url) The application must be able to run in background (Android Service) and be exposed to the user with a persistant notification in the Notification Bar (Android Foreground Service) (ONE problem per question so here i'll be asking for the notification) Since i have several class for managing players, i though creating a

Creating a notification for MediaPlayer with an Android Foreground Service

廉价感情. 提交于 2019-12-21 20:16:15
问题 Here is the problem. I am currently working on an application that must provide : A Radio Player (AAC live streaming from an url) And a PodCast player (MP3 Streaming from an url) The application must be able to run in background (Android Service) and be exposed to the user with a persistant notification in the Notification Bar (Android Foreground Service) (ONE problem per question so here i'll be asking for the notification) Since i have several class for managing players, i though creating a

Audio Crossfading in Android

怎甘沉沦 提交于 2019-12-21 16:51:22
问题 I am develping a media player for my learning purpose and I want to have crossfading feature in media player app. But I don't have clue where to start from. i tried searching on inernet but no luck. I am using Android MediaPlayer class for all media player related operation. Anyone know any workaround to achieve the same. thanks for your support 回答1: Try to use the AudioTrack instead of MediaPlayer. Generally, I'd suggest the following plan: Learn some sources for an app that uses AudioTrack.

What is proper way to specify relative path to file in M3U playlists? [closed]

岁酱吖の 提交于 2019-12-21 13:26:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 11 months ago . What is proper way to specify the path to mp3 file in M3U playlists, for use playlists in hardware players, like Compact & Shelf Stereos, Micro Component Systems, Car Audio Players? I understand the path should be relative, for more reliable playback. For example, Windows Media

Android AudioRecord and MediaRecorder

雨燕双飞 提交于 2019-12-21 13:06:07
问题 I'm developing an audio processing application where I need to record audio, and then process it to obtain features of that recording. However, I want the audio in a playable format to play it after with MediaPlayer. I've seen that to record audio to process it it's better to use AudioRecord, because I can get the raw audio from there. But then I can't write the data to a file in a playable format (is there any library to do this in android?). I used this method to record raw data and then

Android Media Player Wont Play After Stop

只愿长相守 提交于 2019-12-21 12:15:02
问题 I have music playlist for 5 songs. I just want that play and stop buttons work as long as im in app. And that i can stop music when i want to and start another. How this works now...The music plays on PLAY button, and when i click STOP button it stops, but then i want to play some other song, or same song again, nothing happens. Please help. public class glavna extends Activity{ @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate

Iphone - Writing a media player with lyrics

回眸只為那壹抹淺笑 提交于 2019-12-21 05:42:09
问题 I want to write a simple media player which displays lyrics that are retrieved from the web. I know once LyricWiki was such a source, but now no longer exists. Does a new API or source for lyrics exist that I can use ? When I do get the lyrics, how do I sync them with song ? I know the MPMediaItem class has the MPMediaItemPropertyLyrics but this is cleary not enough for me cause this is only for songs from Itunes and not all of them have lyrics available. I would appreciate any help or links

How to prevent mediaplayer to stop when screen goes off?

女生的网名这么多〃 提交于 2019-12-21 04:59:10
问题 I have a mediaplayer in a Music class that is called from another secondary Activity . It works fine. But when screen goes off (either by timeout or button), the music stops playing, and when coming back and try to close the activity the program goes to "App Not Responding", because an IllegalStateException at a query like mediaplayer.isPlaying() . How can I prevent the mediaplayer to stop when screen goes off? Does it have to be through a service?? Assuming that the answer is yes, I tried to