Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:30:40+00:00 2026-06-17T22:30:40+00:00

I use WaveMediaStreamSource (WAVmss) library to play wave files on silverlight media element. It

  • 0

I use WaveMediaStreamSource (WAVmss) library to play wave files on silverlight media element.
It plays the first time I load the file into the element, but when I try and play it a second time it doesn’t play.
I used the sample from here.

Maybe I’m missing something, here is my code where I’m opening wave file and play it successfully for the first time, Here is the file reading and setting as source in my media element:

OpenFileDialog openFileDialog = new OpenFileDialog();    
MemoryStream audioSource = new MemoryStream();

if (openFileDialog.ShowDialog() == true)    
{    
   using (FileStream fileStream = openFileDialog.File.OpenRead())    
   {    
       audioSource.SetLength(fileStream.Length);    
       fileStream.Read(audioSource.GetBuffer(), 0, (int)fileStream.Length);    
   }    
}

WaveMSS.WaveMediaStreamSource audioStreamSource = 
                 new WaveMSS.WaveMediaStreamSource(audioSource);

mediaElement1.SetSource(audioStreamSource);

And when the first play over (I know it since I’m getting _MediaEnded event) I can’t play this video again.

I tried to set the position of the MediaElement but failed to play it again:

mediaElement1.Position = TimeSpan.FromSeconds(0);
mediaElement1.Play();

I debugged it and the Position property does get set to zero but when I’m trying to click play again position property moves to the end and the _MediaEnded event pops up again.

What can I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:30:42+00:00Added an answer on June 17, 2026 at 10:30 pm

    Thanks to Gilles Khouzam quick response the problem has been solved.

    Ok, I found the issue. The implementation of SeekAsync, the position
    in the stream was changed but the remaining count in the chunk was
    not. In WaveMediaStreamSource.cs, look for the SeekAsync method and
    change the code to this (add the MoveToChunkOffest line):

    this.currentPosition = this.wavParser.WaveFormatEx.BufferSizeFromAudioDuration( seekToTime ) + this.startPosition;
    this.wavParser.MoveToChunkOffset( ( uint ) this.wavParser.WaveFormatEx.BufferSizeFromAudioDuration( seekToTime ) );
    this.currentTimeStamp = seekToTime;
    ReportSeekCompleted( seekToTime );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

use Image::Imlib2; my $a = Image::Imlib2->load(/foo/file); gives me the following error: Runtime error: Image::Imlib2
use C#,want to upload excel file on google doc. bellow syntax use to upload
use Text::Table; my $tb = Text::Table->new(Planet,Radius\nkm,Density\ng/cm^3); $tb->load( [ Mercury,2360,3.7], [ Mercury,2360,3.7], [ Mercury,2360,3.7], );
use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More no_plan; use Test::Exception;
use warnings; use Test::More; use File::Find::Rule; use Test::File::Find::Rule; my $rule = File::Find::Rule->file->name('*.pl')->not_grep(qr/^\s*use\s+strict;/m, sub {
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
use strict; use Time::HiRes qw[gettimeofday tv_interval]; my $start_index = int(rand(50))+100;#this value is arbitrary for
Use a fixed length array of maximum size 50. In case the input file
Use to work with a MySQL + + (library for C + +) The
Use Html element SELECT in aspx page like: <SELECT id=MySelection name=MySelection runat=server DataValueField=ID DataTextField=Name></SELECT>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.