Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Traud
Opus
Commits
9fec9bb3
Commit
9fec9bb3
authored
12 years ago
by
Gregory Maxwell
Browse files
Options
Downloads
Patches
Plain Diff
Belabor OPUS_SET_BITRATE instead of max_packet, as this is a common trap.
parent
ba28403a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/opus.h
+8
-5
8 additions, 5 deletions
include/opus.h
include/opus_multistream.h
+16
-12
16 additions, 12 deletions
include/opus_multistream.h
with
24 additions
and
17 deletions
include/opus.h
+
8
−
5
View file @
9fec9bb3
...
...
@@ -136,7 +136,8 @@ extern "C" {
* <li>audio_frame is the audio data in opus_int16 (or float for opus_encode_float())</li>
* <li>frame_size is the duration of the frame in samples (per channel)</li>
* <li>packet is the byte array to which the compressed data is written</li>
* <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended)</li>
* <li>max_packet is the maximum number of bytes that can be written in the packet (4000 bytes is recommended).
* Do not use max_packet to control VBR target bitrate, instead use the #OPUS_SET_BITRATE CTL.</li>
* </ul>
*
* opus_encode() and opus_encode_float() return the number of bytes actually written to the packet.
...
...
@@ -252,9 +253,10 @@ OPUS_EXPORT int opus_encoder_init(
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the
variable
bitrate, but should
* the
instant
bitrate, but should
* not be used as the only bitrate
* control.
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
...
...
@@ -292,9 +294,10 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT opus_int32 opus_encode(
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the
variable
bitrate, but should
* the
instant
bitrate, but should
* not be used as the only bitrate
* control.
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
...
...
This diff is collapsed.
Click to expand it.
include/opus_multistream.h
+
16
−
12
View file @
9fec9bb3
...
...
@@ -335,12 +335,14 @@ OPUS_EXPORT int opus_multistream_encoder_init(
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param max_data_bytes <tt>opus_int32</tt>: Size of the allocated memory for
* the output payload. This may be
* used to impose an upper limit on
* the variable bitrate, but should
* not be used as the only bitrate
* control.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
...
...
@@ -378,12 +380,14 @@ OPUS_EXPORT OPUS_WARN_UNUSED_RESULT int opus_multistream_encode(
* @param[out] data <tt>unsigned char*</tt>: Output payload.
* This must contain storage for at
* least \a max_data_bytes.
* @param max_data_bytes <tt>opus_int32</tt>: Size of the allocated memory for
* the output payload. This may be
* used to impose an upper limit on
* the variable bitrate, but should
* not be used as the only bitrate
* control.
* @param [in] max_data_bytes <tt>opus_int32</tt>: Size of the allocated
* memory for the output
* payload. This may be
* used to impose an upper limit on
* the instant bitrate, but should
* not be used as the only bitrate
* control. Use #OPUS_SET_BITRATE to
* control the bitrate.
* @returns The length of the encoded packet (in bytes) on success or a
* negative error code (see @ref opus_errorcodes) on failure.
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment