9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: vdharani@infernopark.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] /dev/audio test file
Date: Mon, 13 Dec 2004 03:06:26 -0600	[thread overview]
Message-ID: <30419.69.115.255.175.1102928786.squirrel@www.infernopark.com> (raw)
In-Reply-To: <8ba5278400307b60a0b903243cb0e57d@orthanc.cc.titech.ac.jp>

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 was
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 -------------------------------



  parent reply	other threads:[~2004-12-13  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12  8:56 YAMANASHI Takeshi
2004-12-13  2:35 ` Kenji Okamoto
2004-12-13  9:06 ` vdharani [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-13  5:56 YAMANASHI Takeshi
2004-12-13  2:44 YAMANASHI Takeshi
2004-12-08  6:43 YAMANASHI Takeshi
2004-12-08  3:07 YAMANASHI Takeshi
2004-12-08  6:07 ` Russ Cox
2004-12-08  8:49 ` vdharani
2004-12-08  3:46   ` Dan Cross
2004-12-08 13:27   ` Sape Mullender

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30419.69.115.255.175.1102928786.squirrel@www.infernopark.com \
    --to=vdharani@infernopark.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).