Example code in C for sound recording
  • Just looking around
    Posts: 4 from 2004/8/4
    Hi,

    for the program I want to write I need to record sound
    and process it while recording.

    - AHIRecord works great but there is no C source code
    provided.

    - HDRecord from AHI developer package does not seem
    to work on my PegasosII and it also has m68k assembler
    source which I want to avoid (want to code pure
    C if possible)

    - RecordTest.c from AHI developer package does not
    seem to work when compilig with
    gcc -noixemul -o recordtest recordtest.c
    (even not after removing the __far stuff before
    buffer1[] and buffer2[] definition. I included
    some debug printfs with Delay(200) after each
    printf and I saw, that everything seems to work
    until the DoIO() call. When doing that call my
    PegasosII freezes completely (even the mouse
    pointer does not move anymore).

    Do you have a hint on how to change RecordTest.c to
    get it working with soundinput (I have connected
    a microphone to a preamplifier and the preamplifier
    to the line in port of my peg; this setup works
    if used with AHIRecord and with that prog I was
    able to record).

    Or do you know some other (small) C example code
    that shows how to read sound data from line in?

    (and btw.: any idea why mic in does not work and
    why I cannot set it active in PegasosMixer?)

    Thanks in advance and best regards

    (Dent)

    -----
  • »30.08.04 - 21:51
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    ChatDEau
    Posts: 248 from 2003/4/4
    From: MONTREAL, Quebec
    @Dent

    I'm pretty sure you'd have more chance getting an answer on MorphOS Developer Connection, especially if you register.

    Also, did you check the AHI home page? There's a developer section.

    Hope it helps!

    Fred
  • »31.08.04 - 02:33
    Profile Visit Website
  • Just looking around
    Posts: 4 from 2004/8/4
    Thanks for the hint, I will repost it on MorphOS
    Developer Connection then.

    I have the source directly from the AHI homepage but maybe I did some error during compilation...

    Best regards, ciao

    (Denis)

    -----
  • »31.08.04 - 12:53
    Profile