linear encoding with audiotool

linear encoding with audiotool

Post by Cafer Barutcuza » Fri, 28 Jun 1996 04:00:00



Greetings.

I am trying to get my audiotool record in linear encoding rather than u-law
which is the default.

Checked the man pages and it tells you to use some ioctls for this job.
I have tried the following code:

        if ((ioctl(fd_audio, AUDIO_GETINFO, &auInfo)) == -1) {
                perror("ERROR: ioctl AUDIO_GETINFO");
                exit(1);
        }

        printf("encoding    = %d\n", auInfo.play.encoding);

        auInfo.record.encoding = 3;   /* 3 = linear encoding */

        if ((ioctl(fd_audio, AUDIO_SETINFO, &auInfo)) == -1) {
                perror("ERROR: ioctl AUDIO_SETINFO");
                exit(1);
        }

        if ((ioctl(fd_audio, AUDIO_GETINFO, &auInfo2)) == -1) {
                perror("ERROR: ioctl AUDIO_GETINFO");
                exit(1);

        printf("encoding    = %d\n", auInfo2.play.encoding);

where both auInfo and auInfo2 are audio_info_t structs. Both of my printfs result in
printing 1 which is u_law encoding.

Any ideas to get this thing record in linear (8-bit) encoding.
Please reply to:


TIA.

                                   \\|//
                                   (o^o)
+------------------------------oo0--(_)--0oo------------------------------+


|          Emory University            http://www.mathcs.emory.edu/~cafer |  
|          Atlanta GA 30322            Phone : (404) 373-3410             |
|          USA                         Fax   : (404) 727-5611             |
+-------------------------------------------------------------------------+

 
 
 

1. Transfer-Encoding: chuunked AND Content-Encoding: deflate

using zlib
http://www.cdrom.com/pub/infozip/zlib/
and
http://www.winimage.com/zLibDll/

with HTTP/1.1
http://sunsite.auc.dk/RFC/rfc/rfc2616.html

I am attempting to send
Transfer-Encoding: chunked
Content-Encoding: deflate

(from a home-built web server)

to a client browser that has indicated its willingness to accept this:
HTTP HEADER FOLLOWS:
GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
Accept-Language: en,en-ca;q=0.9,de;q=0.8,fr;q=0.7,it;q=0.6,es;q=0.4,da;q=0.3,he;q=0.2,yi;q=0.1
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)
Host: 127.0.0.1
Connection: Keep-Alive

Ive RFC'd myself and tested the component peices individually . successfully.
my interpretation of the RFC leads me to format my HTTP response as:

Headers
chunksize n
deflatedData
chunksize n
deflatedData
chunksize 0

where n is the size of the deflated data

I am applying this deflation to arbitrary mime types and
maintaining the original mime-type.

if i had a website to look at that DOES do this successfully
I could compare  the output to see what I am doing wrong.. or indeed if
my browser is not handling it properly.

Does my interpretation of the RFC as to the format of the chunked and compressed
output seem correct?

Thanks in advance..
-db-

2. slackware bare.i problems?

3. audiotool and audioctl

4. How to NOT wait for an execve() to complete from CGI ???

5. help: what is the audiotool stereo file format

6. New logging application

7. Deleted audiotool from 2.3 - can someone send it to me ?

8. Program software

9. Audiotool does not work after running xdm

10. audiotool ok, but /dev/audio only pops?

11. AudioTool freezes SS5/Sol2.4 for some seconds -- is there a fix?

12. audiotool in AIX Motif ??

13. Audiotool- How to read Microsoft Windows .wav files?