soundeffect

Why won't this Audio play in Windows Phone 7?

馋奶兔 提交于 2019-12-12 03:38:56
问题 I am trying to play audio in my Silverlight for Windows Phone 7 app. I have an MP3 audio file with its build action set to resource. To play the sound, I use: SoundEffectInstance sfi = null; ... Stream source = Application.GetResourceStream(new Uri("/Bird Calls;component/Crow.mp3", UriKind.Relative)).Stream; Microsoft.Xna.Framework.Audio.SoundEffect effect = SoundEffect.FromStream(source); sfi = effect.CreateInstance(); sfi.Play(); This code throws a InvalidOperationException at the

Can't play .amr file in wp8

邮差的信 提交于 2019-12-11 05:36:19
问题 I use AudioVideoCaptureDevice to record the voice and save it to isolated storage with amr format dev = await AudioVideoCaptureDevice.OpenForAudioOnlyAsync(); dev.AudioEncodingFormat = CameraCaptureAudioFormat.Amr; I can play it by windows media player. But I can't play it with SoundEffect in WP8. using (IsolatedStorageFileStream sourceFile = ISF.OpenFile("\\data\\test.amr", FileMode.Open, FileAccess.Read)) { byte[] b = new byte[sourceFile.Length]; sourceFile.Read(b, 0, b.Length); SoundEffect

FFmpeg : How to create rotating 3D(haas) effect in mp3 using ffmpeg?

懵懂的女人 提交于 2019-12-02 08:59:27
问题 I want to add a rotating 3d effect(Haas effect) in mp3. I mean that the audio will seem to change its directions from left to right and vice versa periodically(as shown below) when listened through the headphone. For this, I searched on the Internet and tried to achieve it in the following ways : Firstly, I thought, if I change the audio of the left and right channel periodically( Like when the Right channel has full volume(100%), Left channel has low volume(20%) and vice versa) then I can

FFmpeg : How to create rotating 3D(haas) effect in mp3 using ffmpeg?

主宰稳场 提交于 2019-12-02 05:19:57
I want to add a rotating 3d effect(Haas effect) in mp3. I mean that the audio will seem to change its directions from left to right and vice versa periodically(as shown below) when listened through the headphone. For this, I searched on the Internet and tried to achieve it in the following ways : Firstly, I thought, if I change the audio of the left and right channel periodically( Like when the Right channel has full volume(100%), Left channel has low volume(20%) and vice versa) then I can achieve it but it's not like 3D. Secondly, When I researched more than found that It is done by creating

Android: How to create fade-in/fade-out sound effects for any music file that my app plays?

北城余情 提交于 2019-11-27 03:58:38
The application that I am working on plays music files. If a timer expires I want the music to fade out. How do I do that. I am using MediaPlayer to play music and music files are present in raw folder of my application. One way to do it is to use MediaPlayer.setVolume(right, left) and have these values decrement after every iteration..here is a rough idea float volume = 1; float speed = 0.05f; public void FadeOut(float deltaTime) { MediaPlayer.setVolume(volume, volume); volume -= speed* deltaTime } public void FadeIn(float deltaTime) { MediaPlayer.setVolume(volume, volume); volume += speed*

Android: How to create fade-in/fade-out sound effects for any music file that my app plays?

醉酒当歌 提交于 2019-11-26 10:58:40
问题 The application that I am working on plays music files. If a timer expires I want the music to fade out. How do I do that. I am using MediaPlayer to play music and music files are present in raw folder of my application. 回答1: One way to do it is to use MediaPlayer.setVolume(right, left) and have these values decrement after every iteration..here is a rough idea float volume = 1; float speed = 0.05f; public void FadeOut(float deltaTime) { MediaPlayer.setVolume(volume, volume); volume -= speed*