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

Lorenz Minder <[email protected]>
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <[email protected]>
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.