Audio services: Difference between revisions

Line 605: Line 605:
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.
Takes a type-0x19 input buffer, an u32 '''WorkBufferSize''' and a TransferMemory handle for '''WorkBuffer'''. Returns an [[#IHardwareOpusDecoder]] object. The TransferMemory is created by the user-process with permissions=0.


The input buffer is a 0x110-byte struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that the data at +0x10 can optionally be setup with data specified the user.
The input buffer is a 0x110-byte struct. The user-process initializes this struct the same way as [[#GetWorkBufferSizeForMultiStream]], except that an u8-array specified by the user is copied to +0x10 with size '''ChannelCount''', when '''ChannelCount''' above 0.


== GetWorkBufferSizeForMultiStream ==
== GetWorkBufferSizeForMultiStream ==
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.
Takes a type-0x19 input buffer. Returns the u32 required size for the decoder's work buffer. Official user-processes align the output size to page-alignment.


The input buffer is a 0x110-byte struct.
The input buffer is a 0x110-byte struct. The first 4 u32s are '''SampleRate''', '''ChannelCount''', '''TotalStreamCount''', and '''StereoStreamCount''' while the rest is cleared to zeros.


== IHardwareOpusDecoder ==
== IHardwareOpusDecoder ==