From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <30419.69.115.255.175.1102928786.squirrel@www.infernopark.com> In-Reply-To: <8ba5278400307b60a0b903243cb0e57d@orthanc.cc.titech.ac.jp> References: <8ba5278400307b60a0b903243cb0e57d@orthanc.cc.titech.ac.jp> Date: Mon, 13 Dec 2004 03:06:26 -0600 Subject: Re: [9fans] /dev/audio test file From: vdharani@infernopark.com To: 9fans@cse.psu.edu User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 147c84fa-eace-11e9-9e20-41e7f4b1d025 Hi, > I will look into madplay if i can make it play 48000 Hz. > And the other problem is that I can't change volume. Long back Sape helped me getting Xitel Pro Hifi-Link USB audio device up and running. But it had the same two issues you mentioned. After going through mad player source, I figured how to get it to play at 48000 Hz. I have put the changes in location given below. Hope this solves your problem. Hope this helps. Here is the link: http://www.infernopark.com/plan9/mad/mad.html Thanks dharani -------------------- Notes ------------------------------- mad player patch In Plan 9, the output speed for some USB audio devices cannot be set to 44.1KHz. So the audio device becomes practically unusable for things like MP3 playback. After going through mad player's code, I figured that it wa= s a simple (actually one-line) change to get it to run for 48KHz sampling. With this change, mad player resamples the chunk of audio data to 48KHz and outputs the data. With the change in place, madplay just auto-detects (by reading /dev/volume and finding out the speed) and enables resampling if needed. To force resampling, use -u option. How to build - Download mad mp3 player from here. - gunzip and extract the contents. - Replace madplay.c with this version of madplay.c - Compile and run Here is the diff of the madplay.c file: diff.dat I tested it with Xitel Pro Hifi-Link (to check it works) and Xitel Hifi-Link AN1 (to check it doesnt break the code for non-48KHz devices). Many thanks to Sape for getting the Xitel Pro Hifi-Link working on Plan 9 and helping resolve other USB issues. ... -------------------- End -------------------------------