@@ -61,18 +61,18 @@ uint8_t Opus::packetChannels(const BufViewConst packet) {
6161 return ret >= 0 ? static_cast < uint8_t >(ret) : 0 ;
6262}
6363
64- uint32_t Opus::packetFrames (const BufViewConst packet) {
64+ uint32_t Opus::packetEncodedFrames (const BufViewConst packet) {
6565 const int ret = opus_packet_get_nb_frames (CAST_BUF_CONST (packet.data ()), CAST_SIZE (packet.size ()));
6666 return ret >= 0 ? static_cast < uint32_t >(ret) : 0 ;
6767}
6868
69- uint32_t Opus::packetSamples (const BufViewConst packet, const uint32_t sampleRate) {
69+ uint32_t Opus::packetFrames (const BufViewConst packet, const uint32_t sampleRate) {
7070 const int ret = opus_packet_get_nb_samples (CAST_BUF_CONST (packet.data ()), CAST_SIZE (packet.size ()),
7171 static_cast < int32_t >(sampleRate));
7272 return ret >= 0 ? static_cast < uint32_t >(ret) : 0 ;
7373}
7474
75- uint32_t Opus::packetSamplesPerFrame (const BufViewConst packet, const uint32_t sampleRate) {
75+ uint32_t Opus::packetFramesPerEncodedFrame (const BufViewConst packet, const uint32_t sampleRate) {
7676 const int ret =
7777 opus_packet_get_samples_per_frame (CAST_BUF_CONST (packet.data ()), static_cast < int32_t >(sampleRate));
7878 return ret >= 0 ? static_cast < uint32_t >(ret) : 0 ;
@@ -147,7 +147,7 @@ bool Decoder::togglePhaseInversion(const bool enable) {
147147 return m_p->set (OPUS_SET_PHASE_INVERSION_DISABLED (!enable));
148148}
149149
150- uint32_t Decoder::packetSamples (const BufViewConst packet) {
150+ uint32_t Decoder::packetFrames (const BufViewConst packet) {
151151 const int ret =
152152 opus_decoder_get_nb_samples (m_p->m_ctx .get (), CAST_BUF_CONST (packet.data ()), CAST_SIZE (packet.size ()));
153153 return ret >= 0 ? static_cast < uint32_t >(ret) : 0 ;
0 commit comments