Bug 8002 - SoundPlayer does not play wav files
Summary: SoundPlayer does not play wav files
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-10-25 15:36 UTC by Robert Pickering
Modified: 2014-07-08 03:02 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
example of sound player not playing sound (314 bytes, text/x-csharp)
2012-10-25 15:36 UTC, Robert Pickering
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 8002 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Robert Pickering 2012-10-25 15:36:45 UTC
Created attachment 2795 [details]
example of sound player not playing sound

I'm trying to use the sound player to play a wave file. I've attached a simple repo, you'll need to update the path to valid wav file. Neither the .Play() or .PlaySync() methods play any sound, both return immediately and no exception is thrown. I've noticed if I put an invalid path an exception is thrown, so the file is at least being loaded. 

I'm running this on Ubuntu 12.10 and I've checked that playing a sound though the built in player does work. 

Here's the output of mono version:
Mono JIT compiler version 2.11.4 (tarball Tue Oct 23 06:18:52 CEST 2012)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            Included Boehm (with typed GC and Parallel Mark)


Thanks for your help!
Comment 1 chrys 2014-07-08 03:02:25 UTC
confirmed as descriped.
it seems that is does also not work if i try to play a stream like this:
	class MainClass
	{

			FileStream file = new FileStream("test.wav", 
				FileMode.Open, FileAccess.Read, FileShare.Read);
			SoundPlayer player = new SoundPlayer(file);
			player.PlaySync();
	}

i work on arch.

[chrys@blackbeast Debug]$ mono --version
Mono JIT compiler version 3.4.0 (tarball Wed Jun 25 20:39:03 UTC 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen