I have a Windows Phone application, which can play music using Windows Phone Audio Playback Agent. It has deployed to Windows Phone Market and it worked fine until GDR3 update.
After update I have got the issue:
After 5-10 seconds of playback starts there is a short stuttering (for 1-2 seconds).
The using of Background Audio is pretty common:
var url = new Uri("http://...");
var track = new AudioTrack( url, "Title", "Artist", "Album", null, null,
EnabledPlayerControls.Pause |
EnabledPlayerControls.SkipPrevious |
EnabledPlayerControls.SkipNext);
BackgroundAudioPlayer.Instance.Track = track;
BackgroundAudioPlayer.Instance.Play();
This issue has been reproduced at least on Lumia 720, Lumia 920, Lumia 925 models and only after GDR3 update.
Does anyone run into this annoying issue?
Many thanks in advance.
Related
I have a problem with Web Audio API and an usb audio interface on Linux;
I wrote some audio player code on Web Audio API.
Everything is alright when I connect my 7.1 USB Audio Interface (TASCAM 16x08 - there are 8 output channels) and start my APP on Windows machine. context.destination.maxChannelCount equals 8 and I can select the channel to output the sound.
But when I do the same on Linux machine context.destination.maxChannelCount always is 2 (stereo).
I tried to:
create virtual audio multichannel device = same result - always only 2 maxChannelCount;
setting alsa, pulseaudio, jack audio connection kit and more...
The result is the same: in my code context.destination.maxChannelCount is always is 2
but the operating systems settings dialog detects 8 channels.
This is some code to be clear:
var context = new (window.AudioContext || window.webkitAudioContext)();
var audio = new Audio();
var source = context.createMediaElementSource(audio);
source.connect(context.destination);
audio.src = 'audio.mp3';
audio.play();
console.log(context.destination.maxChannelCount); //output on win: 2
on linux: 8
What can be the problem?
I found solution here https://ubuntuforums.org/archive/index.php/t-1072792.html
solved it by editing /etc/pulse/daemon.conf.
; default-sample-channels
= 2 uncomment the line and add more channels.
What browser are you running? Browser is responsible for giving you those available outputs, if they're not there (in all available browsers) then i think you're out of luck. I have done some things with Web Audio and multiple outputs and even on the same OS i got different results from different browsers.
I am playing a list of audios in an html into UIWebView of IOS with the AudioContext object of the Javascript
eg :
var ctx = new AudioContext();
var node= ctx.createBufferSource();
node.buffer = AudioBufferFromAjaxCall;
node.connect(gainNodeObjCreatedEarlier);
node.start();
and the problem is node.stop(); isnt working , the audio started continuesly playing and not stopping
It would be helpful to know the version of safari that your UIWebView is using and whether or not you can reproduce it in the desktop version. Also, do you get any kind of log or error in the console?
In any case, have you tried passing a parameter to the stop method? something like
node.stop(0);
This argument specifies after how many seconds the node should stop. Sending 0 may help.
I receive over network PCM audio data stream and this part works fine so I am ending up with
DataReader incomming = args.GetDataReader();
byte[] RcvBuffer = new byte[incomming.UnconsumedBufferLength];
incomming.ReadBytes(RcvBuffer);
I have all audio data in buffer.
How I can play this through telephone Speaker ? Can you point me in some direction ?
Thanks
There're many ways to do that.
You can prepend the WAVE header to your data, and use MediaElement for playback, see the documentation for SetSource method.
If however by “telephone speaker” you mean the earphone, then it is only possible if you are creating a VoIP app.
It took a while but I sorted it, maybe someone else will need help in the future.
First Problem - since I just started app development for Windows Phone I have chosen Blank App (Windows Phone) instead Blank App (Windows Phone Silverlight) and I did not have access to many features that are available in Silverlight projects, so my suggestions for beginners: understand what each project is for.
Like Soonts said there are many ways to do this, this is one that I used.
I simplified this code and retyped this so there can be some typos.
using Microsoft.Xna.Framework.Audio;
using System.IO;
1) Create Stream to load your incoming data:
MemoryStream stream = new MemoryStream();
2) Load data from buffer to stream:
stream.Write(RcvBuffer, 0, RcvBuffer.Length);
3) I am using SoundEfect to play this through Loud-Speaker. Sample rate that I use is 8 kHz
SoundEffect sound;
sound = new SoundEffect(stream.toArray(), 8000, AudioChannels.Mono)
sound.Play();
In my manifest file I've add the audio-channel-content in permissions:
"permissions": {
"audio-channel-content":{"description":"Use the audio channel for the music player"}
}
In my index.html I've got an audio tag like:
<audio mozaudiochannel="content" preload="none" src="http://my-stream-url"></audio>
I can play my audio stream during 2mn:
The first one when the phone is unlock.
After 1mn my phone auto-lock the screen and it continue playing for another minute.
Does it possible to play this audio stream more than 1mn after the lock?
Thanks in advance.
The code and permission block you have are correct and I can confirm it is working in Firefox OS 1.1. You can also do the whole thing in Javascript:
audio = new Audio();
audio.preload = 'none';
audio.mozAudioChannelType = 'content';
It's because the wifi is closed after screen shutdown (auto-lock)?
Are you using the dev version of gaia? Wifi is set to always connect in product version.
Samsung Champ Duos I faced worried problem. create media player application.
But it takes too much time in player.realize(); and application gets hung.
In Samsung Wave II it works fine. How to resolve this problem of player.realize in j2ME application for the Samsung duos?
filename : is a releative path to Media file.
player = Manager.createPlayer(filename);
player.addPlayerListener(listener);
player.realize();