Adam Sampson writes:
> A "FILE *" is not a file descriptor -- libc functions like fopen,
> fread, fprintf etc. work with FILE *s, and system calls like open,
> read and ioctl work with integer file descriptors. You can use the
> fileno function to get the file descriptor that the FILE * is using,
> so change "audio_fd" to "fileno(audio_fd)" in that ioctl call, and it
> should be a bit happier.
Thank you. I figured I was doing something dumb like
that and yes, I believe I have seen warnings pertaining to what
you are saying, here, so it makes lots of sense.
>
> The compiler should be complaining about you converting a pointer to
> an integer when you compile that ioctl call as it currently stands;
> it's always a good idea to use the -Wall compiler flag and pay careful
> attention to the warnings it produces.
Again, thanks.
Thanks to some help on IRC #lab i can now start jack in normal mode. when doing
so i get these messages http://pastebin.com/854673
However when i try to start jack in realtime mode (priority 70) it fails to
start and returns these errors;http://pastebin.com/854674
I have 64 studio installed so realtime should be OK, I have however run alsa in
module-assistant in a effort to fix some sound issues that i was having (I was
unable to get sound in firefox) so i wonder if this may have broken my realtime
module?
How am I able to get back the default sound setup from the 64studio CD?
Thanks
Sam
my system spec; http://hp-nx6325.pbwiki.com/
----------------------------------------------------------------
This message was sent via Slackmail, web mail from Psand.net.
Hi!
If I have a midi-interface, one of those externals, to which you can connect
more than one device (synth, keyboard), how does this look to alsa? Does it
only see one dvice with a lot of channels or does it see more devices? I think
about getting one to use it with midish, which uses rawmidi devices and I
wonder if it will work.
Kindest regards
Julien
--------
Music was my first love and it will be my last (John Miles)
======== FIND MY WEB-PROJECT AT: ========
http://ltsb.sourceforge.net
the Linux TextBased Studio guide
======= AND MY PERSONAL PAGES AT: =======
http://www.juliencoder.de
I wrote a VOX or Voice Actuated Relay recording program
about 4 years ago and have been adding to it. It occurred to me
that I may be able to get 2 VOX's for the price of one by opening
/dev/dsp in stereo mode instead of the straight /dev/dsp mode I
have been using. This should give me a 16-bit value each time
with half of it being the left channel audio sample and the other
half being the right channel. To cut to the chase, I can't seem
to open /dev/dsp in this manner. I found some 90's era
documentation about oss-sound and Linux audio. Of course, there
is mention of /dev/dspw (my salvation!). As with many older and
direct methods, it no longer exists. At least modern Debian
systems running the 2.6.5 kernel with ALSA don't have it so there
must be another way to do it.
Another 90's document has a snippet of code using ioctl
and it compiles, but I will show you what happens.
Here is what blows up. The source has the following
includes:
#include <stdio.h>
#include <signal.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/soundcard.h>
#include <sys/ioctl.h>
#include <time.h>
#include <unistd.h>
This next variable is defined inside main
int format = 0;
The audio device file descriptor is defined as
FILE *audio_fd;
The part of the code that fails is taken right from the
example.
/*Set 8-K stereo mode.*/
format = AFMT_S16_LE;
/*On my system, that sets format to 16.*/
if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1)
{ /* Fatal error */
perror("SNDCTL_DSP_SETFMT");
exit(1);
}
The failure appears to have nothing to do with sound
capabilities. Here is what gdb shows when stepping through the
program. /dev/dsp successfully opens first for reading so that
is no problem. The very next thing I do is to try to use the
ioctl to set the number of channels. That is the code you see
above. Here is what happens when we get there:
Breakpoint 2, main (argc=2, argv=0xbffff684) at vx2ch.c:118
118 if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1)
(gdb) step
120 perror("SNDCTL_DSP_SETFMT");
(gdb)
SNDCTL_DSP_SETFMT: Bad file descriptor
121 exit(1);
The file descriptor being passed to SNDCTL_DSP_SETFMT is
audio_fd. If I take all this code out, you have the original
program which runs just fine but only uses straight /dev/dsp
(8-bit, 8-K mono). I'd stick the whole source in here, but it's
322 lines and all of it works except what I have demonstrated.
With alsa installed, what is the best practice for
opening some version of /dev/dsp for two 8-K 8-bit streams such
that you get a 16-bit stream?
Thanks for any suggestions or pointers to newer
documentation.
Martin McCormick WB5AGZ Stillwater, OK
Systems Engineer
OSU Information Technology Department Network Operations Group
--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Figured I could use Freewheeling in a DJ mix:
http://rasmus.uib.no/~jri022/ting/loopshowtape01.mp3
There's also Hydrogen and Seq24 in there, but just for timing and
metronoming. They'll be pulled further into the mix as time goes by,
hopefully creating a live-show consisting of live production of beats
and looping.
But for now there's just the records. Hope ya'll like...
--
Ringheims Auto - Fri musikk for bilstereo!
http://ringheimsauto.org
jack_mixer version 2 released.
jack_mixer is GTK (2.x) JACK audio mixer with look similar to it`s
hardware counterparts. It has lot of useful features, apart from being
able to mix multiple JACK audio streams.
Changes since version 1:
* Fix compilation issue for 64-bit platforms (-fPIC)
* Add new meter scale - iec268, fewer marks
* Add hints in documentation for compiling on Ubuntu
* Fix compilation with offsetof macro definition
Homepage with screenshots: http://home.gna.org/jackmixer/
Download: http://download.gna.org/jackmixer/
--
Nedko Arnaudov <GnuPG KeyID: DE1716B0>
> Hi,
>
> - What is the output of : cat /proc/asound/cards
user@64studio:~$ cat /proc/asound/cards
0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0x32080000 irq 50
> - Can you use aplay :
user@64studio:~$ aplay -f cd -d hw:0,0 Fred--Zorns_Ziphim.wav
ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave
aplay: main:550: audio open error: Device or resource busy
If I run alsaconf first then it does play...
Thanks
Sam
> >> This is my full hardware spec: http://hp-nx6325.pbwiki.com/
Chuck wrote;
> Wow, I have SB450 and haven't yet heard a whisper from it. Did you
> have to do anything special?
all i did was buy the laptop and install 64studio on it...
----------------------------------------------------------------
This message was sent via Slackmail, web mail from Psand.net.
Hi all,
Any news on this one? IIRC, there was some talk that such a feature would be
sponsored by Google's summer of code, but am not sure if this was the case
or if anything ever became of it?
Best wishes,
Ico
Hello and happy new year to all linux-musicians,
I just had a look to my dmesg info this morning and I saw that the
kernel used in 64studio 1.0 I installed 3 days ago doesn't used all my
RAM (I have 1 Go).
Google tells me they were two ways to fix it :
- Apply the ck patch from Con Kolivas
- Recompile the kernel activating kernel 1G..
In both case, it looks to me quite difficult to apply on a real time
kernel (sources of 2.6.17-2-multimedia doesn't seem to be available on
the web, I couldn't find them) and I'm not experimented enough to
compile a normal kernel (2.6.18 for example) and to apply realtime patch...
Is there another solution ?
Do you know where to find sources for my kernel ?
Best regards.
# dmesg
Linux version 2.6.17-2-multimedia-486 (root(a)64studio.com) (gcc version
4.0.4 20060507 (prerelease) (Debian 4.0.3-3)) #1 PREEMPT Tue Jun 27
10:40:20 UTC 2006
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)
BIOS-e820: 000000003fff0000 - 000000003fff8000 (ACPI data)
BIOS-e820: 000000003fff8000 - 0000000040000000 (ACPI NVS)
BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.
896MB LOWMEM available.
--
Yohann
http://www.xrousse.org | mailto:yo@xrousse.org | MSN yoyo(a)xrousse.org | GPG: 0x43D83E36
C'est toi le nouveau ?
Je ne sais pas, je viens d'arriver