[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: microphone



Adam Hardy wrote:

> 
> I'm trying to pick this stuff up but I find the amixer man page quite
> obtuse, and I'm not finding an alsa-oriented website that's any better
> either.

so you don't thinks this page is informative enough?
http://www.alsa-project.org/main/index.php/Main_Page
http://alsa.opensrc.org/index.php/Main_Page
http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture
http://en.wikipedia.org/wiki/Open_Sound_System
http://www.opensound.com/wiki/index.php/Tips_And_Tricks#ALSA_Emulation

> 
> I can't figure out why you recommend changing 'input source 1'. What about
> 0 and 2? And anyway, I can't figure out how to change them in alsamixer
> (there seem to be no options for anything except mute), nor in amixer with
> its sset and cset parameters.

because you could then choose between inputs. I'm using kde3.5 and tested
this with kde4.4 I have a file that sets up the cards with a fix id. This
was very helpful

cat /etc/modprobe.d/sound (lenny) or /etc/modprobe.d/sound.conf
(testing/sid)

## ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-usb-audio

options snd-hda-intel index=0 model=ref
options snd-usb-audio index=1

(reload modules and relogin)

> 
> And if that doesn't sound like I'm having a bad time, Java has just
> decided it is getting upset with what I'm doing and can't use sound
> anymore:
> 
> Error: Sound line is not
> available.javax.sound.sampled.LineUnavailableException:
> line with format PCM_UNSIGNED 11025.0 Hz, 8 bit, mono, 1 bytes/frame,  not
> supported.

may be you can ask yourself if 11025.0 Hz, 8 bit, mono, 1 bytes/frame is
what you are targetting. IF you are developing a sound app you should know
more about sound architecture and also read about java-pulseaudio. there
should be interface (API) for it and I would use it. Still I think you have
to take care what data you send to the audio output and prepare the audio
system for it.

> 
> It was happy enough until I started messing with the mic - I wondered why
> my Java app had gone silent. Not that it was that noisy.

what interface is java using - it could be they are using dsp device and you
have an app running and blocking it - it's picky. read more about linux
sound - there is a lot info.

> 
> Sorry if this is getting boring but if there's a good source for
> documentation on this stuff, just point me at it and I'll figure it out.

I'm not using java - especially for sound (java makes your brain lazy). It's
useful for internet and portable apps but it still has performance issues
as sound needs speed in realtime. So basically what the java guys do they
use gsm audio because it's low freq compressed audio data. I really don't
want to know what you are doing but there is a lot of information in the
net about how linux audio work (the links above) and it's not just linux,
but again you should first start asking yourself the question which
interface you are targetting - /dev/dsp* or /dev/snd/*. I guess java is
using the oss audio interface. Understand how your system works. Get code
samples - you are not the one inventing the wheel - and subscribe a list
about java sound development. I admit alsa is not for beginners, that's why
people made pulseaudio, but if you understand alsa you will love it.
regards.




Reply to: