background-audio

WP7 Background Audio - Memory Leak or Not?

落花浮王杯 提交于 2019-12-10 10:56:12
问题 I'm creating an app that plays background audio. Here's the RAM usage of my background audio playing process: Is this a memory leak or no? I'm concerned because if / when it exceeds 15MB, the OS will silently kill my player, which is undesirable. Is there a way to view what occupies that memory? My MediaStreamSource implementation only allocates single 512kb buffer on the startup, and never allocates a single byte while playing. BTW, the stream bitrate is 96 kbit/sec, which is the same as

What's the easiest way to play audio in background in UWP?

点点圈 提交于 2019-12-09 22:58:52
问题 I am working on my Project (a soundcloud client) and the app can play tracks just fine, but not when the app is minimized. I use the MediaElement-Object for playing the mp3 from the url. How can i force the music to continue playing the music, when the app is in the background. Or whats the easiest way/best explained tutorial to implement this. I searched alot for a good answer, but the ones, i found, was too good for me :D What means, that i didn't understand it. 回答1: To play audio in the

Using MediaTransportControls with BackgroundMediaPlay in Background Audio Task UWP

↘锁芯ラ 提交于 2019-12-08 10:09:01
问题 I am building a UWP App that plays Audio in the Background. I have successfully set it up and it's running with a simple play/pause Button. Now I need to play Audio using a MediaElement control that has MediaTransportControls enabled. I have read that it is impossible to play Background Audio using Media Element. Here in this article they suggest using BackgroundMediaPlayer: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e6bb37ec-49f7-4e5a-91ef-44ae3725a761/uwpbackground-audio-on

Running Background Audio in different pages of UWP App

喜欢而已 提交于 2019-12-08 06:33:31
问题 I am making a UWP App where I run Background Audio in the MainPage on a Button Click event. When I move to another page, there's also a different Media to play in Background Audio Task there. How can I stop the currently playing Task to run the other? Should I define something globally? Any help regarding this issue? Edit I am using this sample: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/BackgroundAudio While the backgroundAudio of the first Page is running, I

WP7 Background Audio - Memory Leak or Not?

邮差的信 提交于 2019-12-06 11:24:39
I'm creating an app that plays background audio. Here's the RAM usage of my background audio playing process: Is this a memory leak or no? I'm concerned because if / when it exceeds 15MB, the OS will silently kill my player, which is undesirable. Is there a way to view what occupies that memory? My MediaStreamSource implementation only allocates single 512kb buffer on the startup, and never allocates a single byte while playing. BTW, the stream bitrate is 96 kbit/sec, which is the same as memory allocation rate of the app. Is there a way to make the GC to be less lazy, and sleep for less then

BackgroundAudioPlayer is 'Playing' but not calling GetSampleAsync()

余生颓废 提交于 2019-12-06 10:48:14
问题 I am streaming music from the web in a background agent using a custom MediaStreamSource. In good network conditions this works fine, but when network connectivity is spotty a strange problem surfaces. When a track starts playback, all goes well up through the first call to MediaStreamSource.GetSampleAsync(). Because the connection is spotty, if not enough data is available the source calls ReportGetSampleProgress(double) and returns without reporting a sample. This is in accordance with MSDN

BackgroundAudioPlayer is 'Playing' but not calling GetSampleAsync()

﹥>﹥吖頭↗ 提交于 2019-12-04 15:47:25
I am streaming music from the web in a background agent using a custom MediaStreamSource. In good network conditions this works fine, but when network connectivity is spotty a strange problem surfaces. When a track starts playback, all goes well up through the first call to MediaStreamSource.GetSampleAsync(). Because the connection is spotty, if not enough data is available the source calls ReportGetSampleProgress(double) and returns without reporting a sample. This is in accordance with MSDN documentation and code samples. What's curious is that there are no further calls to GetSampleAsync at

What's the easiest way to play audio in background in UWP?

家住魔仙堡 提交于 2019-12-04 15:10:04
I am working on my Project (a soundcloud client) and the app can play tracks just fine, but not when the app is minimized. I use the MediaElement-Object for playing the mp3 from the url. How can i force the music to continue playing the music, when the app is in the background. Or whats the easiest way/best explained tutorial to implement this. I searched alot for a good answer, but the ones, i found, was too good for me :D What means, that i didn't understand it. To play audio in the background you will have to do a Declaration in Package.appxmanifest for a Background Tasks, enable audio and

Preinitialize BackgroundAudioPlayer in WP7?

自闭症网瘾萝莉.ら 提交于 2019-12-04 10:57:59
When I am using the BackgroundAudioPlayer in my Windows Phone 7 application, it takes a lot of time to load the first time I want to play a song. Is there any way of preinitializing the BackgroundAudioPlayer before playing the first track, so that when I start playing, it starts right along? I have googled it, but no luck. I am just using BackgroundAudioPlayer.Instance when I e.g. want to play, pause, stop etc an audiotrack. Is there something other i could do to fix this? You could just call BackgroundAudioPlayer.Instance.Stop(); in your App constructor and then discard the first occurance of

How can I save the settings in the IsolatedStorage while BackgroundAudioPlayer's instance is active?

ぃ、小莉子 提交于 2019-12-04 02:32:06
问题 I have Two projects in my Solution. Let's say Project A and Project B. Project A It's the main project and has settings. I have a check box to give user an option to "Repeat" track(s). This project can also access PROJECT B's public instances. Project B It's the BackgroundAudioAgent and has it's own settings. This project doesn't have access to PROJECT A settings. Therefore, in PROJECT A , I need to access the settings of PROJECT B and save it there. So that, when the "Repeat" is enabled, the