|
JUCE
|
Options that affect the output data format produced by an AudioFormatWriter. More...
Public Types | |
| enum class | SampleFormat { automatic , integral , floatingPoint } |
| Used to provide a hint to the AudioFormatWriter for the output sample format. More... | |
Public Member Functions | |
| AudioFormatWriterOptions | withSampleFormat (SampleFormat x) const |
| Returns a copy of these options with the specified sample format. | |
| AudioFormatWriterOptions | withSampleRate (double x) const |
| Returns a copy of these options with the specified sample rate. | |
| AudioFormatWriterOptions | withChannelLayout (const AudioChannelSet &x) const |
| Returns a copy of these options with the specified channel set. | |
| AudioFormatWriterOptions | withNumChannels (int x) const |
| Returns a copy of these options with the specified number of channels. | |
| AudioFormatWriterOptions | withBitsPerSample (int x) const |
| Returns a copy of these options with the specified bit size per sample. | |
| AudioFormatWriterOptions | withMetadataValues (const std::unordered_map< String, String > &x) const |
| Returns a copy of these options with the specified metadata container. | |
| AudioFormatWriterOptions | withMetadata (const String &key, const String &value) const |
| Returns a copy of these options with the specified metadata added. | |
| AudioFormatWriterOptions | withQualityOptionIndex (int x) const |
| Returns a copy of these options with the specified quality option index. | |
| auto | getSampleRate () const |
| auto | getChannelLayout () const |
| auto | getNumChannels () const |
| auto | getBitsPerSample () const |
| auto | getMetadataValues () const |
| auto | getQualityOptionIndex () const |
| auto | getSampleFormat () const |
Options that affect the output data format produced by an AudioFormatWriter.
Format specific writers may ignore some of these options.
Used to provide a hint to the AudioFormatWriter for the output sample format.
Use automatic for the old behaviour. The values integral and floatingPoint can be used with the WavAudioFormat when using a bit depth of 32. Other formats are not affected by this setting.
| Enumerator | |
|---|---|
| automatic | Lets the writer decide the format based on the other parameter values. |
| integral | Integral format, e.g. PCM in case of the WavAudioFormat. |
| floatingPoint | IEEE floating point format. |
| AudioFormatWriterOptions AudioFormatWriterOptions::withSampleFormat | ( | SampleFormat | x | ) | const |
Returns a copy of these options with the specified sample format.
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withSampleRate | ( | double | x | ) | const |
Returns a copy of these options with the specified sample rate.
This specifies the sample rate for the file, which must be one of the ones returned by AudioFormat::getPossibleSampleRates().
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withChannelLayout | ( | const AudioChannelSet & | x | ) | const |
Returns a copy of these options with the specified channel set.
Setting this option will supersede the value passed into withNumChannels().
You should prefer to use withChannelLayout(), if specifying an AudioChannelSet is applicable, and withNumChannels() otherwise.
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withNumChannels | ( | int | x | ) | const |
Returns a copy of these options with the specified number of channels.
This is meant as a fallback for specifying the channel layout. Setting this option will have no effect if the channel layout is specified.
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withBitsPerSample | ( | int | x | ) | const |
Returns a copy of these options with the specified bit size per sample.
This must be one of the values returned by AudioFormat::getPossibleBitDepths().
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withMetadataValues | ( | const std::unordered_map< String, String > & | x | ) | const |
Returns a copy of these options with the specified metadata container.
As an alternative to this function, you can specify the key-value pairs one-by-one using the withMetadata function.
Subsequent calls of this function overwrites all previously added metadata.
This parameter is a set of metadata values that the writer should try to write to the stream. Exactly what these are depends on the format, and the subclass doesn't actually have to do anything with them if it doesn't want to. Have a look at the specific format implementation classes to see possible values that can be used.
References withMember(), and x.
| AudioFormatWriterOptions AudioFormatWriterOptions::withMetadata | ( | const String & | key, |
| const String & | value | ||
| ) | const |
Returns a copy of these options with the specified metadata added.
Subsequent calls of this function adds new metadata values, while also preserving the previously added ones.
Here you can specify metadata values that the writer should try to write to the stream. Exactly what these are depends on the format, and the subclass doesn't actually have to do anything with them if it doesn't want to. Have a look at the specific format implementation classes to see possible values that can be used.
| AudioFormatWriterOptions AudioFormatWriterOptions::withQualityOptionIndex | ( | int | x | ) | const |
Returns a copy of these options with the specified quality option index.
The index of one of the items returned by the AudioFormat::getQualityOptions() method.
References withMember(), and x.
| auto AudioFormatWriterOptions::getSampleRate | ( | ) | const |
| auto AudioFormatWriterOptions::getChannelLayout | ( | ) | const |
| auto AudioFormatWriterOptions::getNumChannels | ( | ) | const |
| auto AudioFormatWriterOptions::getBitsPerSample | ( | ) | const |
| auto AudioFormatWriterOptions::getMetadataValues | ( | ) | const |
| auto AudioFormatWriterOptions::getQualityOptionIndex | ( | ) | const |
| auto AudioFormatWriterOptions::getSampleFormat | ( | ) | const |