[flac-dev] New C++ file encode example
Bastiaan Timmer
basjetimmer at yahoo.com
Sat Sep 15 00:31:20 PDT 2012
Full source of the second version.
The difference in the second version is that the metadata objects are no longer heap-allocated. This is more in line with the concept of RAII,
and removes the need to keep setting and checking the 'ok' bool, which
in the first version needs to be done from the moment the metadata[] is
created. The only downside is that users following this example would
need to remember to make sure the metadata objects are kept in scope for the duration of encoding. On the other hand, they no longer have to
remember to delete all the objects at every point the program returns.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main_ver2.cpp
Type: application/octet-stream
Size: 5932 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20120915/11909e4a/attachment-0001.obj
More information about the flac-dev
mailing list