Re: [ecasound] What is the purpose of AUDIO_IO_DEVICE::io_mode == io_readwrite?

From: Lorenz Minder <lminder@email-addr-hidden>
Date: Fri Aug 05 2011 - 09:54:04 EEST

Hi Kai,

Thanks for your explanations, they are very much appreciated! The
message I take home from this is that is that devices (unlike file
backends) ought to not implement io_readwrite, since there is no proper
analogy.

As a note aside, "r+" (with creation of a new file if no such already
exists) would be the better analogy below, since "w+" discards the
contents of the previous file, which apppears not to be what is intended
here.

Best,
--Lorenz

Kai Vehmanen wrote:
> >I have a question regarding the io_mode for an audio device: What is
> >the purpose of the io_readwrite mode? I was assuming that devices
>
> it's analogous to "w+" mode of fopen. Quoting fopen man page:
> ""w+: Open for reading and writing. The file is created if it does
> not exist, otherwise it is truncated. The stream is positioned at
> the beginning'of the file.""
>
> Simiarly io_write is similar to "w" mode, i.e. the output is always
> truncated.
>
> >So what is the purpose if io_readwrite in that context, and how is a
> >device supposed to handle that?
>
> The main use case for io_readwrite is the ability to open file
> outputs in update mode (e.g. to replace only portions of a
> recording, or continue recording at the end of an existing file).

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Fri Aug 5 12:15:01 2011

This archive was generated by hypermail 2.1.8 : Fri Aug 05 2011 - 12:15:01 EEST