Port-i386 archive

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

audio, NetBSD-6.1.0_PATCH

        I just rebuilt a few times some undertested since late last
        summer versions of praat, Doing phonetics by computer, which
        provides for linguistics a spectrogram machine in software.

        Previously I got basic function by modifying the makefiles in
        the usual ways and hand editing the /dev entries to be for
        /dev/audio rather than /dev/dsp for linux.  This was running
        with some testing of audio working on NetBSD-5.1.2 and then the
        cvs -r netbsd-6 of NetBSD-6.0 from about April 2012.

        I didn't do much with it since Aug. 2012, due to other projects
        and concerns, so recent adapting the source tree with versions
        is undertested. (I assumed foolishly that it would still work as
        well as before when I tested it and played with it a bit.)

        I just upgraded to NetBSD-6.1-RELEASE, and then the cvs -r
        netbsd-6-1 upgrade after I reported some X11 cve's to tech-x11
        and saw some newer versions in the cvsweb tree.  So I am running
        on a Dell Latitude D610:

bash-4.2$ uname -a
NetBSD peano.jtcl.org 6.1.0_PATCH NetBSD 6.1.0_PATCH (Peano12c -r netbsd-6-1 -D 
today auich.c new xsrc updates) #0: Sat Jun  1 15:44:42 CDT 2013  
jtowler%peano.jtcl.org@localhost:/usr/obj/sys/arch/i386/compile/Peano12c i386

        I changed a number of device entries in the within praat
        portaudio code and its audio handling code elsewhere from
        linux /dev/dsp to /dev/audio.

        I tested v. 5351 and other earlier working versions, 5313, 5316,
        5317, 5322 by the file dates, and praat gave a user error about
        PortAudio not able to open the sound device for output.

        I don't know C++ very well, I had to learn it to try and port
        firefox by hand until I got smarter about pkgsrc, but anyway,
        the bulk of the code is in C++.  I found the text of the error
        fn and it seems to initialize or assume by its caller in the
        code that there is an audio_fd not initialized/opened properly.

        Before I dig in and mess with this until it goes or gets fixed
        by the author accidentally from their probable linux builds in
        development, is there anything about /dev/audio in NetBSD-6.1
        from 6.0 (BETA, BETA2, STABLE) that would cause this kind of 
        was working, now not for a globally applied uniform substution
        to /dev/audio that I should look at first.  Reread the man pages
        on audio(4), and looked at /usr/include/sys/soundcard.h.  What
        other suggestions in this area should I look at to patch rather
        than redesign this project's code base for NetBSD.  Just hoping
        for more knowledgable suggestions.

        I just did a run of atf-run | atf-report, and of the 16 failures
        (I think, I nuked the window already), none were involved with
        /dev/audio, /dev/sound, /dev/mixer, or /dev/audioctl.

        A sample file of linguistic data, a meeting recorded.

        cat meeting.wav > /dev/audio

        produces static, but the speaker/audio shows some of the dataset

        bash-42# audioplay meeting.wav 

        also produces some of the dataset with a
        chunk of static.


        play meeting.wav

        from sox produces the best representation of the linguistic data
        as an audio source.  The sound does work for this file, and
        another wav file like it in size and content, tonight, testing.

        praat in its functions has some playback for the sound being
        analyzed and including time-slices.  praat didn't work just
        playing the sound as above.  

        Just on this information, is there somewhere in the src tree or
        the man pages or the Guide (read on audio tonight), that I
        should look at.  I found out the hard way that for alsa to work,
        in addition to -lasound, it needs also g++ * -lasound -lossaudio
        -lm in the Makefile.  Directions are sketchy, -lasound as alsa
        2, I also found out the hard way by running nm -s on all the
        libraries in /usr/local/lib etc.  

        Is there something like this about NetBSD-6.1 specifically, or
        about porting to NetBSD from his (Paul Boersma, a phonetician)
        assumed environment of linux with #define DEFAULT_AUDIO_DEVICE
        "/dev/dsp" , -lasound for alsa and /dev/dsp a few other places
        in the project's source tree ---presumably this is just a linux
        convention, that is my assumption---that I should be looking for
        to edit and patch and make this code run to do linguistics with
        the machine.  Thanks in advance for any suggestions.  

        I found that the June 2012 -current sys/dev/pci/auich.c for the
        AC'97 audio chipset which the D610 has, was fixed to make the
        mic port work.  My recent but not -current NetBSD-6.1.0_PATCH has
        this single file (auichreg.h is unchanged) changed to make this
        also work--the non-standard part of my build.

        Going on too long, sorry.

        John R. Towler

Home | Main Index | Thread Index | Old Index