chaostic

Group: Members
Posts: 328
Joined: Mar. 2005 |
 |
Posted: May 19 2008,23:44 |
 |
I am trying to modify a program (Mixer.app 1.8.0) so it will save and load all its options to/from a settings file. It already saves the previous volume settings, but I would like to be able to save the channel sources (as a name, not a number), the mute status, the mixer device, the display number (not really needed), the wheelbutton source, Label Text and Instance Name.
The numbers are easy (Volume and WheelButton source), I just copied the code it already has. The text options is what are hard. Sure, I can keep mute as a 0 or 1, and the source as a number (1-25 depending on the source name), but that doesn't make the settings file easy to manually edit. Plus the text options like mixer device, or Label text can't be converted to a number.
From my point of view, this should be easy to anyone who has some experience with reading strings or chars from a fixed layout file, but when I try to make changes to it, my changes segfault (only when loading the file/settings. It saves them okay) Of course, I never learned C++, just java, and looking online, my changes should work. On top of that, adding c++ code to print to cout doesn't seem to work. Then again, segfaulting might happen before it gets a chance to finish processing the couts?
Any help would be appreciated. PM me if you want what I already have. Thanks.
|