Skip to content

question about startStream method on android #532

@rouddy

Description

@rouddy

i have a question on android.
i read the document that streaming feature support pcm16bits.
but it seems that android code library code use read(byte[], int, int) method.

    @Throws(Exception::class)
    fun read(): ByteArray {
        val buffer = ByteArray(bufferSize)
        val resultBytes = reader.read(buffer, 0, buffer.size)
        if (resultBytes < 0) {
            throw Exception(getReadFailureReason(resultBytes))
        }

        if (resultBytes > 0) {
            // Update amplitude
            amplitude = getAmplitude(buffer, resultBytes)
        }

        return buffer
    }

but it seems this method's format should be ENCODING_PCM_8BIT on android document.

is it really pcm 16bits data streamed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions