-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
16 changed files
with
163 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version=0.19.0 | ||
profile = conventional | ||
break-separators = after | ||
space-around-lists = false | ||
doc-comments = before | ||
match-indent = 2 | ||
match-indent-nested = always | ||
parens-ite | ||
exp-grouping = preserve | ||
module-item-spacing = compact |
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 |
---|---|---|
@@ -1,17 +1,20 @@ | ||
(lang dune 2.0) | ||
(version 0.5.0) | ||
(lang dune 2.8) | ||
(version 0.5.1) | ||
(name faad) | ||
(source (github savonet/ocaml-faad)) | ||
(license GPL-2.0) | ||
(authors "The Savonet Team <savonet-users@lists.sourceforge.net>") | ||
(maintainers "Romain Beauxis <toots@rastageeks.org>") | ||
|
||
(generate_opam_files true) | ||
(use_standard_c_and_cxx_flags false) | ||
|
||
(package | ||
(name faad) | ||
(synopsis "Bindings for the faad library which provides functions for decoding AAC audio files") | ||
(depends | ||
(dune (> 2.0)) | ||
conf-faad | ||
conf-pkg-config | ||
dune | ||
dune-configurator) | ||
) |
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,25 +1,19 @@ | ||
module C = Configurator.V1 | ||
|
||
let faad_test_code = {| | ||
#include <neaacdec.h> | ||
|
||
int main() | ||
{ | ||
NeAACDecHandle hAac = NeAACDecOpen(); | ||
unsigned char input[1024]; | ||
size_t input_size = 0; | ||
unsigned long samplerate; | ||
unsigned char channels; | ||
|
||
char err = NeAACDecInit(hAac, input, input_size, &samplerate, &channels); | ||
|
||
return 0; | ||
} | ||
|} | ||
|
||
let () = | ||
C.main ~name:"has_faad" (fun c -> | ||
let has_faad = C.c_test c faad_test_code ~link_flags:["-lfaad -lm"] in | ||
|
||
C.C_define.gen_header_file c ~fname:"config.h" | ||
[ "HAS_FAAD", Switch has_faad ]); | ||
C.main ~name:"faad2-pkg-config" (fun c -> | ||
let default : C.Pkg_config.package_conf = | ||
{ libs = ["-lfaad2"]; cflags = [] } | ||
in | ||
let conf = | ||
match C.Pkg_config.get c with | ||
| None -> default | ||
| Some pc -> ( | ||
match | ||
C.Pkg_config.query_expr_err pc ~package:"faad2" ~expr:"mad" | ||
with | ||
| Error msg -> failwith msg | ||
| Ok deps -> deps) | ||
in | ||
C.Flags.write_sexp "c_flags.sexp" conf.cflags; | ||
C.Flags.write_sexp "c_library_flags.sexp" conf.libs) |
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
Oops, something went wrong.