Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellga committed Jun 22, 2024
1 parent 26d61e9 commit 1e527c2
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 53 deletions.
8 changes: 3 additions & 5 deletions _docs/contents/hdecodedaudio.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An audio represented by an HArray of samples and its corresponding sampling rate

## harray

`harray() -> HArray`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L63) </span> \
`harray() -> HArray`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L62) </span> \

Get the decoded HArray.

Expand All @@ -24,14 +24,13 @@ fpath = "../../../testfiles/gs-16b-2c-44100hz.flac"
dtype = HDataType$Float32
hdecodedaudio = HFile$decode(fpath, dtype)
hdecodedaudio$harray()

```

_________

## sr

`sr() -> integer`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L90) </span> \
`sr() -> integer`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L88) </span> \

Get the sampling rate of the decoded audio.

Expand All @@ -47,14 +46,13 @@ fpath = "../../../testfiles/gs-16b-2c-44100hz.flac"
dtype = HDataType$Float32
hdecodedaudio = HFile$decode(fpath, dtype)
hdecodedaudio$sr()

```

_________

## invalidate

`invalidate()`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L121) </span> \
`invalidate()`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L119) </span> \

Replaces the inner value of the external pointer, invalidating it.

Expand Down
2 changes: 1 addition & 1 deletion _docs/contents/hdecoderstream.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ An iterator that decodes audio in streams.

## stream

`stream() -> HArray`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L524) </span> \
`stream() -> HArray`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L522) </span> \

Gets the next wave of frames as an `HArray`.

Expand Down
10 changes: 5 additions & 5 deletions _docs/contents/hfile.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A collection of methods designed to streamline input and output operations.

## decode

`decode(fpath: string, dtype: HDataType) -> HDecodedAudio`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L166) </span> \
`decode(fpath: string, dtype: HDataType) -> HDecodedAudio`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L164) </span> \

Decode an audio file, providing its decoded data and the sampling rate.

Expand Down Expand Up @@ -45,7 +45,7 @@ _________

## decode_stream

`decode_stream(fpath: string, frames: integer, dtype: HDataType) -> HDecoderStream`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L224) </span> \
`decode_stream(fpath: string, frames: integer, dtype: HDataType) -> HDecoderStream`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L222) </span> \

Creates an `HDecoderStream`, used as an iterator to stream frames of decoded audio.

Expand Down Expand Up @@ -81,7 +81,7 @@ _________

## metadata

`metadata(fpath: string, metadata_type: HMetadataType) -> list`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L366) </span> \
`metadata(fpath: string, metadata_type: HMetadataType) -> list`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L364) </span> \

Extract text and visual metadata from a file.

Expand Down Expand Up @@ -198,7 +198,7 @@ _________

## params

`params(fpath: string) -> atomicvector`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L441) </span> \
`params(fpath: string) -> atomicvector`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L439) </span> \

Get audio parameters from a file.

Expand Down Expand Up @@ -231,7 +231,7 @@ _________

## verify

`verify(fpath: string) -> string`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L481) </span> \
`verify(fpath: string) -> string`<span style="float: right;"> [source](https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L479) </span> \

Verify an audio file, if supported by the decoder.

Expand Down
6 changes: 3 additions & 3 deletions docs/contents/hdecodedaudio.html
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ <h1 class="title">HDecodedAudio</h1>
<h1>Methods</h1>
<section id="harray" class="level2">
<h2 class="anchored" data-anchor-id="harray">harray</h2>
<p><code>harray() -&gt; HArray</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L63">source</a> </span><br>
<p><code>harray() -&gt; HArray</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L62">source</a> </span><br>
</p>
<p>Get the decoded HArray.</p>
<section id="returns" class="level4">
Expand All @@ -320,7 +320,7 @@ <h4 class="anchored" data-anchor-id="examples">Examples</h4>
</section>
<section id="sr" class="level2">
<h2 class="anchored" data-anchor-id="sr">sr</h2>
<p><code>sr() -&gt; integer</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L90">source</a> </span><br>
<p><code>sr() -&gt; integer</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L88">source</a> </span><br>
</p>
<p>Get the sampling rate of the decoded audio.</p>
<section id="returns-1" class="level4">
Expand All @@ -339,7 +339,7 @@ <h4 class="anchored" data-anchor-id="examples-1">Examples</h4>
</section>
<section id="invalidate" class="level2">
<h2 class="anchored" data-anchor-id="invalidate">invalidate</h2>
<p><code>invalidate()</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L121">source</a> </span><br>
<p><code>invalidate()</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L119">source</a> </span><br>
</p>
<p>Replaces the inner value of the external pointer, invalidating it.</p>
<p>This function is useful to remove one of the shared references of the inner pointer in rust.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/contents/hdecoderstream.html
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ <h1 class="title">HDecoderStream</h1>
<h1>Methods</h1>
<section id="stream" class="level2">
<h2 class="anchored" data-anchor-id="stream">stream</h2>
<p><code>stream() -&gt; HArray</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L524">source</a> </span><br>
<p><code>stream() -&gt; HArray</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L522">source</a> </span><br>
</p>
<p>Gets the next wave of frames as an <code>HArray</code>.</p>
<p>Returns an error if it’s end of stream or if an error ocurred in the decoding process.</p>
Expand Down
10 changes: 5 additions & 5 deletions docs/contents/hfile.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ <h1 class="title">HFile</h1>
<h1>Methods</h1>
<section id="decode" class="level2">
<h2 class="anchored" data-anchor-id="decode">decode</h2>
<p><code>decode(fpath: string, dtype: HDataType) -&gt; HDecodedAudio</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L166">source</a> </span><br>
<p><code>decode(fpath: string, dtype: HDataType) -&gt; HDecodedAudio</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L164">source</a> </span><br>
</p>
<p>Decode an audio file, providing its decoded data and the sampling rate.</p>
<p>The samples are normalized to fit in the range of [-1.0, 1.0].</p>
Expand Down Expand Up @@ -337,7 +337,7 @@ <h4 class="anchored" data-anchor-id="examples">Examples</h4>
</section>
<section id="decode_stream" class="level2">
<h2 class="anchored" data-anchor-id="decode_stream">decode_stream</h2>
<p><code>decode_stream(fpath: string, frames: integer, dtype: HDataType) -&gt; HDecoderStream</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L224">source</a> </span><br>
<p><code>decode_stream(fpath: string, frames: integer, dtype: HDataType) -&gt; HDecoderStream</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L222">source</a> </span><br>
</p>
<p>Creates an <code>HDecoderStream</code>, used as an iterator to stream frames of decoded audio.</p>
<section id="arguments-1" class="level4">
Expand Down Expand Up @@ -371,7 +371,7 @@ <h4 class="anchored" data-anchor-id="examples-1">Examples</h4>
</section>
<section id="metadata" class="level2">
<h2 class="anchored" data-anchor-id="metadata">metadata</h2>
<p><code>metadata(fpath: string, metadata_type: HMetadataType) -&gt; list</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L366">source</a> </span><br>
<p><code>metadata(fpath: string, metadata_type: HMetadataType) -&gt; list</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L364">source</a> </span><br>
</p>
<p>Extract text and visual metadata from a file.</p>
<p>Tags that are part of the container format are preferentially extracted. Additional tags that were found while probing will not be extracted.</p>
Expand Down Expand Up @@ -449,7 +449,7 @@ <h4 class="anchored" data-anchor-id="examples-2">Examples</h4>
</section>
<section id="params" class="level2">
<h2 class="anchored" data-anchor-id="params">params</h2>
<p><code>params(fpath: string) -&gt; atomicvector</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L441">source</a> </span><br>
<p><code>params(fpath: string) -&gt; atomicvector</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L439">source</a> </span><br>
</p>
<p>Get audio parameters from a file.</p>
<p>Note that this avoids loading the contents into memory, and is therefore useful for querying these parameters from long files.</p>
Expand Down Expand Up @@ -480,7 +480,7 @@ <h4 class="anchored" data-anchor-id="examples-3">Examples</h4>
</section>
<section id="verify" class="level2">
<h2 class="anchored" data-anchor-id="verify">verify</h2>
<p><code>verify(fpath: string) -&gt; string</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L481">source</a> </span><br>
<p><code>verify(fpath: string) -&gt; string</code><span style="float: right;"> <a href="https://github.com/daniellga/harmonium/tree/master/r-harmonium/src/rust/src/hfile.rs#L479">source</a> </span><br>
</p>
<p>Verify an audio file, if supported by the decoder.</p>
<p>The verification is done after the decoding process is finished.</p>
Expand Down
Loading

0 comments on commit 1e527c2

Please sign in to comment.