This project is read-only.

Problems reproducing songs (pause and resume)



I tried your WP8.1 Project and I have encountered two problems.

When I use the music control to pause and then resume the song (I've tried this with 3-4 different FLAC files) the app doesn't resume the playback of the song and the playback seems be freezed.
To resume the playback I had to press pause and then play.

Sometimes when i tried to reproduce some FLAC files (pressing multiple times play, pause ecc.) Visual Studio give me this warning:
"WinRT information: Not enough storage is available to complete this operation."
The exception occurred in this portion of code into the file "FlacWaveStream.cs": (I've attached the screenshot of the error)
        private IEnumerator<ArraySegment<byte>> IterateOverStream()
            this._streamInfo = this._flacDecoder.GetStreamInfo();
            yield return new ArraySegment<byte>(new byte[0]);

            while (true)
                FlacSample sample = this._flacDecoder.GetSample();

                if (sample != null)
                    yield return new ArraySegment<byte>(sample.Buffer); //Here Visual studio give me this warning: "WinRT information: Not enough storage is available to complete this operation."
                    this._isIteratorFinished = true;
Can you help me to resolve these issues?

Thank you

file attachments


JWortman30 wrote Sep 3, 2014 at 3:47 AM

I am having the same issue, it happens after pausing and playing again. Does anyone have an idea on how this might be fixed? Thanks!

Alovchin wrote Sep 3, 2014 at 12:09 PM

Hi all,

I'm aware of these two issues.

The first one (play / pause) seems to be related to a background task code. I'm going to update the way the files are being read inside Windows Runtime component, and I'll try to fix the issue. Meanwhile, if you managed to resolve it, feel free to submit a patch.

The second issue is much more difficult. It seems that it is related to how Windows Runtime handles IO operations on the files, but I have encountered such problems on a local file, so my second assumption that it is related either to how Debugger manages memory or maybe to some bugs in emulator.

I'll try to figure out how to fix these as soon as possible.

Anyway, thank you for heads up, and keep in mind that the project is always open for suggestions and fixes.

wrote Dec 1, 2017 at 2:37 AM