protux-devel
[Top][All Lists]
Advanced

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

Re: [Protux-devel] Open Task


From: Luciano Giordana
Subject: Re: [Protux-devel] Open Task
Date: Mon, 30 Jun 2003 02:48:57 -0400
User-agent: KMail/1.5

You dont need to go so far, I have a standard routine using libmustux (which 
makes it pretty simple)
 take a look (please reihard, save this example for libmustux documentation )

        int busId=0; // or 1 or 2, and so on.. must be any valid busId.
        int channels =  MustuxAudioDeviceMapper::STEREO;
        int rate=44100;
        int bitDepth = 16;
        if (MustuxAudioDeviceMapper::open_bus_out(busId, rate, bitDepth)<0)
                {
                // error
                }
        buf = MustuxAudioDeviceMapper::get_bus_out_transfer_buffer(busId, 
channels);
        bufSize = MustuxAudioDeviceMapper::get_bus_out_transfer_size(busId);

        while (!feof(file))
                {
                fread(buf,1,bufsize,file);
                int r=MustuxAudioDeviceMapper::bus_out_transfer(bus);
                if (r==MustuxAudioDeviceMapper::ERROR_UNDERRUN)
                        {
                        // Error...
                        }
                }

        MustuxAudioDeviceMapper::close_bus_out(busId);

any doubts, please feel free to ask




On Sunday 29 June 2003 03:41 pm, rsff wrote:
> Martin,
>
> have a look at the ALSA playback programs. It should give you a good
> idea/start on the playing engine. Just a thought.
>
>
> Fabio.

-- 
Best Regards
--
Luciano Giordana - Musician - Certified Java/GNU C++ Developer - Free Software 
Evangelist
Project Mustux - http://www.freesoftware.fsf.org/mustux
-- GNU/Linux adoption grew 65% only this yer. Smile : we're winning. --




reply via email to

[Prev in Thread] Current Thread [Next in Thread]