-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d40d1d7
commit f9cb679
Showing
6 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,7 @@ set(SRCS | |
aes.c | ||
async.c | ||
aubuf.c | ||
aulength.c | ||
aulevel.c | ||
auresamp.c | ||
av1.c | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* @file src/aulength.c audio file duration test | ||
* | ||
* Copyright (C) 2023 Lars Immisch | ||
*/ | ||
|
||
#include <re.h> | ||
#include <rem.h> | ||
#include "test.h" | ||
|
||
|
||
#define DEBUG_MODULE "aulength" | ||
#define DEBUG_LEVEL 5 | ||
#include <re_dbg.h> | ||
|
||
|
||
int test_aulength(void) | ||
{ | ||
struct aufile *af; | ||
struct aufile_prm prm; | ||
char path[256]; | ||
|
||
re_snprintf(path, sizeof(path), "%s/beep.wav", test_datapath()); | ||
|
||
int err = aufile_open(&af, &prm, path, AUFILE_READ); | ||
if (err) | ||
return err; | ||
|
||
size_t length = aufile_get_length(af, &prm); | ||
TEST_EQUALS(67, length); | ||
|
||
out: | ||
mem_deref(af); | ||
|
||
return err; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters