search for: sndctl_dsp_setfmt

Displaying 7 results from an estimated 7 matches for "sndctl_dsp_setfmt".

2004 Aug 06
1
[PATCH] Re: Decoding .spx with 1.0 on ppc produces noise!
...@uow.edu.au> University of Wollongong --- speex-1.0/src/speexdec.c Fri Mar 21 08:52:39 2003 +++ speex-1.0-works/src/speexdec.c Thu Apr 17 06:39:23 2003 @@ -136,7 +136,7 @@ exit(1); } - format=AFMT_S16_LE; + format=AFMT_S16_NE; if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1) { perror("SNDCTL_DSP_SETFMT"); @@ -612,7 +612,7 @@ } /*Convert to short and save to output file*/ for (i=0;i<frame_size*channels;i++) - out[i]=(short)le_short((short)floor(....
2006 Oct 12
1
Problem with encoding and decoding
...argv++; }; } card=open("/dev/dsp", O_RDWR, 0); if (card<0) { return false; } else{ channels=1; if (ioctl (card, SNDCTL_DSP_CHANNELS, &channels)==-1) { return false; } format = AFMT_S16_NE; tmp = ioctl (card, SNDCTL_DSP_SETFMT, &format); if (tmp==-1) { return false; } // set speed tmp = 16000; ioctl(card, SNDCTL_DSP_SPEED, &tmp); } /*Create a new encoder state in narrowband mode*/ state = speex_encoder_init(&speex_nb_mode); /*Set the quality to 8 (15 kbps)*/ tmp=8;...
2004 Aug 06
4
Decoding .spx with 1.0 on ppc produces noise!
Hi, I got my hands on the LCA 2003 CD today and I tried to listen to it on my powerbook running Linux. Instead of getting speech, I got an earfull of noise! Attempting the same experiment on an i386 with the same CD produced understandable speech. It seems that the output routine in speexdec converts the output data to little endian short format, which is incorrect on the ppc architecture. The
2007 Dec 01
1
OpenBSD related patches
Hello, list ! Here is diff of changes, i had to make to get swfdec running on OpenBSD 4.2-current. Regards Valery. P.S. Please cc me, i am not subscribed to the list -------------- next part -------------- A non-text attachment was scrubbed... Name: swfdec.diff Type: application/octet-stream Size: 11628 bytes Desc: not available Url :
2008 Apr 04
0
speexdec 1.2.3
...{ #if defined HAVE_SYS_SOUNDCARD_H int audio_fd, format, stereo; audio_fd=open("/dev/dsp", O_WRONLY); if (audio_fd<0) { perror("Cannot open /dev/dsp"); exit(1); } format=AFMT_S16_NE; if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &format)==-1) { perror("SNDCTL_DSP_SETFMT"); close(audio_fd); exit(1); } stereo=0; if (*channels==2) stereo=1; if (ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo)==-1) { perror("SNDCTL_DSP_STEREO&q...
2007 Jul 16
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_oss.c
...Channel *channel; + Stream *stream; + guint rate; + int dsp_fd, ret, format, channels, fragsize; + + dsp_fd = open("/dev/dsp", O_WRONLY); + if (dsp_fd == -1) { + g_printerr ("Failed to open /dev/dsp\n"); + return; + } + + format = AFMT_S16_LE; + ret = ioctl(dsp_fd, SNDCTL_DSP_SETFMT, &format); + if (ret == -1) { + g_printerr ("Failed to set sound format\n"); + close(dsp_fd); + return; + } + + channels = 2; + ret = ioctl(dsp_fd, SNDCTL_DSP_CHANNELS, &channels); + if (ret == -1) { + g_printerr ("Failed to set stereo\n"); + close(ds...
2008 Apr 04
2
speexdec 1.2.3
On Fri, Apr 4, 2008 at 12:19 AM, Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> wrote: > Jahn, Ray (R.) a ?crit : > > > Dear Speex codec community: > > > > I am working on conversion of voice files. I could not figure out how to use speexdec.exe 1.2.3 in piped mode in order to avoid the creation of the potentially large intermediate *.wav or *.pcm files. Any