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.
main_ver2.cpp
Description: Binary data
___
flac-dev mailing list
flac-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/flac-dev