Mercurial > hg > audiodb
view power.cpp @ 423:b09d2eb1a2b2 api-inversion
Cheap hackery abounds.
Include an accumulator into the query_loop chain. Somewhat
surprisingly, very few tests fail, and those that do are due to
over-specific reporting requirements in the case of ties, so rewrite
those tests to be more permissive.
There are probably codepaths which ignore the accumulator completely;
they will still work, because the accumulator will return zero points
when it is asked to ->get_points().
author | mas01cr |
---|---|
date | Wed, 24 Dec 2008 10:55:08 +0000 |
parents | 7038f31124d1 |
children |
line wrap: on
line source
#include "audioDB.h" extern "C" { #include "audioDB_API.h" #include "audioDB-internals.h" } int audiodb_power(adb_t *adb) { if(!(adb->flags & O_RDWR)) { return 1; } if(adb->header->length > 0) { return 1; } adb->header->flags |= O2_FLAG_POWER; return audiodb_sync_header(adb); }