[CommandHipc(13)] // 13.0.0+ // GetActiveAudioOutputDeviceName() -> buffer<bytes, 6> public ResultCode GetActiveAudioOutputDeviceName(ServiceCtx context) { string name = _impl.GetActiveAudioOutputDeviceName(); ulong position = context.Request.ReceiveBuff[0].Position; ulong size = context.Request.ReceiveBuff[0].Size; byte[] deviceNameBuffer = Encoding.ASCII.GetBytes(name + "\0"); if ((ulong)deviceNameBuffer.Length <= size) { context.Memory.Write(position, deviceNameBuffer); } else { Logger.Error?.Print(LogClass.ServiceAudio, $"Output buffer size {size} too small!"); } return(ResultCode.Success); }