···11+# fern
22+33+WIP Gleam bindings to ALSA libasound2 using the Erlang [alsa](https://hex.pm/packages/alsa) package.
44+55+[](https://hex.pm/packages/fern)
66+[](https://hexdocs.pm/fern/)
77+88+```sh
99+gleam add fern@1
1010+```
1111+```gleam
1212+import fern
1313+1414+pub fn main() -> Nil {
1515+ // TODO: An example of the project in use
1616+}
1717+```
1818+1919+Further documentation can be found at <https://hexdocs.pm/fern>.
2020+2121+## Development
2222+2323+```sh
2424+gleam run # Run the project
2525+gleam test # Run the tests
2626+```
···11+name = "fern"
22+version = "1.0.0"
33+44+# Fill out these fields if you intend to generate HTML documentation or publish
55+# your project to the Hex package manager.
66+#
77+# description = ""
88+# licences = ["Apache-2.0"]
99+# repository = { type = "github", user = "", repo = "" }
1010+# links = [{ title = "Website", href = "" }]
1111+#
1212+# For a full reference of all the available options, you can have a look at
1313+# https://gleam.run/writing-gleam/gleam-toml/.
1414+1515+[dependencies]
1616+gleam_stdlib = ">= 0.44.0 and < 2.0.0"
1717+alsa = ">= 0.2.3 and < 1.0.0"
1818+simplifile = ">= 2.3.2 and < 3.0.0"
1919+ffmpex = ">= 0.11.0 and < 1.0.0"
2020+jason = ">= 1.4.4 and < 2.0.0"
2121+decimal = ">= 2.3.0 and < 3.0.0"
2222+2323+[dev-dependencies]
2424+gleeunit = ">= 1.0.0 and < 2.0.0"
2525+2626+[erlang]
2727+extra_applications = ["alsa"]
+24
manifest.toml
···11+# This file was generated by Gleam
22+# You typically do not need to edit this file
33+44+packages = [
55+ { name = "alsa", version = "0.2.3", build_tools = ["rebar3"], requirements = ["reg"], otp_app = "alsa", source = "hex", outer_checksum = "DA779A59C2670F6C23E0552EFA8F0F87C81105A832A464264A3E33A8F84A360C" },
66+ { name = "decimal", version = "2.3.0", build_tools = ["mix"], requirements = [], otp_app = "decimal", source = "hex", outer_checksum = "A4D66355CB29CB47C3CF30E71329E58361CFCB37C34235EF3BF1D7BF3773AEAC" },
77+ { name = "ffmpex", version = "0.11.0", build_tools = ["mix"], requirements = ["jason", "rambo"], otp_app = "ffmpex", source = "hex", outer_checksum = "2429D67BADC91957ACE572B9169615619740904A58791289BA54D99E57A164EB" },
88+ { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" },
99+ { name = "gleam_stdlib", version = "0.68.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F7FAEBD8EF260664E86A46C8DBA23508D1D11BB3BCC6EE1B89B3BC3E5C83FF1E" },
1010+ { name = "gleeunit", version = "1.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "DA9553CE58B67924B3C631F96FE3370C49EB6D6DC6B384EC4862CC4AAA718F3C" },
1111+ { name = "jason", version = "1.4.4", build_tools = ["mix"], requirements = ["decimal"], otp_app = "jason", source = "hex", outer_checksum = "C5EB0CAB91F094599F94D55BC63409236A8EC69A21A67814529E8D5F6CC90B3B" },
1212+ { name = "rambo", version = "0.3.4", build_tools = ["mix"], requirements = [], otp_app = "rambo", source = "hex", outer_checksum = "0CC54ED089FBBC84B65F4B8A774224EBFE60E5C80186FAFC7910B3E379AD58F1" },
1313+ { name = "reg", version = "0.1.0", build_tools = ["rebar3"], requirements = [], otp_app = "reg", source = "hex", outer_checksum = "A857A3392BE5E6736E6138219F6B9BE455520F53ED71F51406931743C8216D3E" },
1414+ { name = "simplifile", version = "2.3.2", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "E049B4DACD4D206D87843BCF4C775A50AE0F50A52031A2FFB40C9ED07D6EC70A" },
1515+]
1616+1717+[requirements]
1818+alsa = { version = ">= 0.2.3 and < 1.0.0" }
1919+decimal = { version = ">= 2.3.0 and < 3.0.0" }
2020+ffmpex = { version = ">= 0.11.0 and < 1.0.0" }
2121+gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" }
2222+gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
2323+jason = { version = ">= 1.4.4 and < 2.0.0" }
2424+simplifile = { version = ">= 2.3.2 and < 3.0.0" }
···11+// Fucked up result type in different file to not collide with Result from the
22+// prelude - yippee
33+@internal
44+pub type AlsaResult {
55+ Ok
66+ Error(AlsaPcmError)
77+}
88+99+@external(erlang, "alsa_pcm", "error")
1010+pub type AlsaPcmError