summaryrefslogtreecommitdiffstats
path: root/media/audio/audio_parameters.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/audio/audio_parameters.h')
-rw-r--r--media/audio/audio_parameters.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index b7b8ae5..9172d74 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -24,15 +24,21 @@ struct AudioParameters {
AudioParameters();
- AudioParameters(Format format, int channels,
- int sample_rate, int bits_per_sample);
+ AudioParameters(Format format, int channels, int sample_rate,
+ int bits_per_sample, int samples_per_packet);
+ // Checks that all values are in the expected range. All limits are specified
+ // in media::Limits.
bool IsValid() const;
- Format format; // Format of the stream.
- int channels; // Number of channels.
- int sample_rate; // Sampling frequency/rate.
- int bits_per_sample; // Number of bits per sample.
+ // Returns size of audio packets in bytes.
+ int GetPacketSize() const;
+
+ Format format; // Format of the stream.
+ int channels; // Number of channels.
+ int sample_rate; // Sampling frequency/rate.
+ int bits_per_sample; // Number of bits per sample.
+ int samples_per_packet; // Size of a packet in frames.
};
#endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_