Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Reading / Writing Wav files in C.

  • 03-05-2005 11:04PM
    #1
    Users Awaiting Email Confirmation Posts: 729 ✭✭✭


    I tried google, but to no avail :(

    Does anybody know how I'd go about reading and or writing wav-files in C (Any Format it doesn't really matter). And by reading wav files I mean storing floats in an array, the way that the 'wavread' function in matlab does.

    Any help would be very much appreciated.

    Oh and C not C++ :eek:


Comments

  • Closed Accounts Posts: 35 opthrcks


    I tried google with:
    wav reader c

    And on page 2 got

    http://www.mcternan.me.uk/MCS/

    which has a file on the page called WavLib.zip which, at a quick glance, seems to contain the basics of both a WAV reader and writer.


  • Registered Users, Registered Users 2 Posts: 131 ✭✭theexis


    If you're targeting the Windows platform, mmioWrite etc is the system supported implementation.


  • Users Awaiting Email Confirmation Posts: 729 ✭✭✭popinfresh


    I tried google with:
    wav reader c

    And on page 2 got

    http://www.mcternan.me.uk/MCS/

    which has a file on the page called WavLib.zip which, at a quick glance, seems to contain the basics of both a WAV reader and writer.


    Thanks. It seems my choice of words used in google were crap :). That should do the trick, but bear in mind I'm a programming n00bie. i.e The most complicated thing I'm doing ATM is structs . But I'm sure I'll be able to figure it out :cool:


  • Registered Users, Registered Users 2 Posts: 2,281 ✭✭✭DeadBankClerk


    Have a look at http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=4422&lngWId=3
    it explains the windows waveout functions pretty well, as well as the wave file format.


Advertisement
Advertisement