Thread: Basic file io
View Single Post
Old 05-06-2014, 04:56 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,992
Default

Quote:
Originally Posted by stw View Post
My next challenge is to prepare my plug for some basic file reads and writes to handle user data.
Unfortunately my trials with standard input/output classes failed. Since i couldn't find any examples on how to deal with that in wdl i'd like to ask if i may have overlooked something. If not maybe someone could pass me some basic information?
While I would usually advocate using the C++ standard library for many tasks, file I/O tends to be a sore point where it IMHO just doesn't work well. WDL has the WDL_FileRead and WDL_FileWrite classes (fileread.h and filewrite.h) that might work better. Of course, as usual, no obvious example code exists on how to use them.

If you'd like, I can try writing some code that uses those WDL classes? It would be helpful to know what kind of data exactly you need to write and read, though...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote