Loop wav file seamleassly in the background on windows 8 - windows-8

I have managed to get seamsless looping of wav files using the SharpDX library.
But this does not seem to work while the app is minimised (in the background).
Using the metro players I do not get a seamless loop this is why I use XAudio2 in the SharpDX library.
Hope someone can help with this.

When your app is in the background it no longer has access to the CPU so your audio will stop playing.
The only way around this is with background agents running the audio component. The issue here is that the certification process will be hard on you if you are just playing looping audio. Playing audio in the background is intended for audio player apps (like the inbuilt "Music" app).
If I were a user of your app I would likely be unhappy that it clogs up the audio system when it isn't in the foreground (if, for example, I went to answer a Lync call). If the only way to stop your app playing audio is to go and turn it off manually or exit the app then my opinion is that the user experience isn't great.
Of course, you may have a different opinion, or your app might be doing something I haven't considered.

Related

Blender and Itunes

I am currently working on a project using Blender. However, when I go to to use
itunes and listen to my music at the same time, both of them get messy to work with.
If itunes is running and i want to render, itunes skips and is not responsive while i render a test photo or a scene.
If i am rendering while itunes is playing a song, it takes ages to get a keyframe done.
Both programs are not happy and are slow when i try to use them at the same time, should i use a dedicated computer for blender and to render my projects on that computer?
You might consider limiting the resources blender can use for rendering. It could be better than having them fight eachother.
https://blender.stackexchange.com/questions/15247/how-to-configure-blender-so-that-it-uses-only-50-of-total-cpu-when-rendering
the link is to some answers on how to control blender's resource usage.

How to play sound from resources using windows media player?

I am making a game, so at one point I need to play two sounds at once, so I played the first one using the "My.Computer.Audio.Play()" Method to load from resources.
As for the second, I used Windows Media Player to load the second sound In A SPECIFIC FOLDER, now I know it is possible to extract files to a folder and program it to play from there to avoid trouble, but I don't want them to be extracted.
So I'm trying to get the file path from resources and put it in WMP's URL, but couldn't get any result after searching the internet.
Am I missing something?
And if you know any better alternative, make sure it can:
1- Replay sound (coding with timer is ok),
2- Change Sound Position
You can use the MediaPlayer class in code or MediaElement in XAML for playing audio files in a WPF application. Check out the article WPF Media Player In VB.NET for code samples.

Mac API to get current media playing

On the mac you can use their native 'f-keys' to do things like change volume, brightness, and even pause or play music or video.
I was wondering if there was someway to access to 'now playing' media (music or video) through an API or something?
I know it's possible to get currently playing tracks from iTunes using things like ITLibMediaItem or even from other apps by using Applescript to ask the application what it's header is. But how would you figure out which application is the 'currently playing' one and then get the play pause functionality?
Does Apple have an API for this?

iOS 7 App Operations Running In Background; Saving a Video Recording In Background

I am currently trying to find the most efficient way to continue a method in the background of my app.
I am probably adding location/gps to my app soon, so I was considering using that flag to keep the app Active in the background. However, I do not want to add that flag yet because I want to post an App Update before I add the location functionality.
I know the exceptions;
Apps that play audible content to the user while in the background, such as a music player app
Apps that keep users informed of their location at all times, such as a navigation app
Apps that support Voice over Internet Protocol (VoIP)
Newsstand apps that need to download and process new content
Apps that receive regular updates from external accessories
Besides asking for a more generic idea then these ^, can someone explain the "external accessory" flag please? I am recording video from an outside device. However, I do not know what constitutes an "external accessory".
I also see that iOS7 has introduced new Multi-tasking functionality but I haven't seen any examples that I understand can someone also explain that? Maybe that is a viable solution?
Thanks in advance!

block ipad camera

Is there any way in which the usage of the camera of the iPad2 can be restricted only to my application? even if it is using i tunes.
could not find any code related to it. some code would be helpful.
There's no way to achieve this. I think it could be done with quite a bunch of hacking if you were developing for Cydia, but I'm not sure ever then. If the user quits your application or switches from it, the system will make the camera available to any other app requesting it.