Commit graph

50 commits

Author SHA1 Message Date
Lioncash 40c9c5a55c audren_u: Use a std::array instead of std::string for holding the audio interface/device name
std::string doesn't include the null-terminator in its data() + size()
range. This ensures that the null-terminator will also be written to the buffer
2018-07-19 23:15:27 -04:00
Lioncash c20cea118b audout_u: Use a std::array instead of std::string for holding the audio interface name
Uses a type that doesn't potentially dynamically allocate, and ensures
that the name of the interface is properly null-terminated when writing
it to the buffer.
2018-07-19 23:15:00 -04:00
bunnei d3cfaf95c8
Merge pull request #726 from lioncash/overload
hle_ipc: Introduce generic WriteBuffer overload for multiple container types
2018-07-19 16:18:38 -07:00
Lioncash ff500a7b68 hle_ipc: Introduce generic WriteBuffer overload for multiple container types
This introduces a slightly more generic variant of WriteBuffer().
Notably, this variant doesn't constrain the arguments to only accepting
std::vector instances. It accepts whatever adheres to the
ContiguousContainer concept in the C++ standard library.

This essentially means, std::array, std::string, and std::vector can be
used directly with this interface. The interface no longer forces you to
solely use containers that dynamically allocate.

To ensure our overloads play nice with one another, we only enable the
container-based WriteBuffer if the argument is not a pointer, otherwise
we fall back to the pointer-based one.
2018-07-19 17:05:12 -04:00
Lioncash c061c2bf3c hle/service: Make constructors explicit where applicable
Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
2018-07-19 12:25:02 -04:00
David Marcec 8bd8d1e3da We only need to alert for memory pool changes 2018-07-13 10:36:28 +10:00
David Marcec 6642011706 initialized voice status and unused sizes in the update data header 2018-07-13 10:35:44 +10:00
David Marcec 706892de7d Audout "Auto" functions
Audout autos are identical to their counterpart except for the buffer type which yuzu already handles for us.
2018-07-12 16:57:31 +10:00
David 3dab0e284b Update AudioRenderer Voice Sections (#614)
* voice section updating

* fixed slight offset miscalculation

* fixed overflow
2018-07-03 13:09:10 -04:00
James Rowe 638956aa81 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
bunnei da2bdbc0d7
Merge pull request #588 from mailwl/hwopus
Service/Audio: add hwopus service, stub GetWorkBufferSize function
2018-06-27 21:57:21 -04:00
David c9e821e93e Send the correct RequestUpdateAudioRenderer revision in the output header (#587)
* We should be returning our revision instead of what is requested.

Hardware test on a 5.1.0 console

* Added sysversion comment
2018-06-25 10:34:41 -04:00
mailwl 11fb17054e Service/Audio: add hwopus service, stub GetWorkBufferSize function 2018-06-25 16:44:17 +03:00
David 838724c588 Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader (#583)
* Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader

According to game symbols(SMO), there's references to UpdateDataHeader which seems to be what AudioRendererResponse actually is

* oops

* AudioRendererParameters should be AudioRendererParameter according to SMO
2018-06-23 20:46:29 -04:00
David 81f24f5685 Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly (#580)
* Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly

This fixes RequestUpdateAudioRenderer deadlocks in games like Puyo Puyo Tetris and games which require a proper section size in games such as Retro City Rampage. This fixes causes various games to start rendering or trying to render
2018-06-22 22:22:33 -04:00
mailwl c06d6b27f3 Service/Audio: update audren:u service 2018-06-21 10:26:24 +03:00
Subv a3d82ef5d9 Build: Fixed some MSVC warnings in various parts of the code. 2018-06-20 11:39:10 -05:00
David e6df4b37db GetAudioRendererWorkBufferSize impl (#465)
* GetAudioRendererWorkBufferSize impl

Impl of GetAudioRendererWorkBufferSize based on RE, if this can be cleaned up, please contribute!

* Naming conventions

* Removed unneeded placeholder

* lioncache changes

* fixed const

* switched to Common::AlignUp
2018-05-25 22:30:02 -04:00
greggameplayer c6eaf0b2cf Correct audio command numbers & add or rename some functions (#455)
* Add unknown function at the number command 2

* correct audout:u commands numbers

* correct audrec:u cmd number & add Unknown function

* correct IAudioDevice command numbers

* correct codecctl cmd numbers & rename the 8 function

* correct place of unknown function & fix clang-format
2018-05-20 23:48:44 -04:00
Lioncash 0197e28cc9
core_timing: Namespace all functions and constants in core_timing's header
All of these variables and functions are related to timings and should be within the namespace.
2018-04-30 03:32:59 -04:00
David Marcec 7391741a20 Merge branch 'master' of https://github.com/yuzu-emu/yuzu into service-impl 2018-04-26 14:28:54 -07:00
Lioncash 8d32bf9a96
audio: Move logging macros over to new fmt-compatible ones 2018-04-24 10:18:09 -04:00
David Marcec 27650499bc GetIUserInterface->CreateUserInterface, Added todos and stub logs. Playreport->PlayReport. 2018-04-22 19:02:18 -07:00
David Marcec f3137d3bc1 Implemented GetIUserInterface properly, Playreport and SSL::SetInterfaceVersion. Fixed ipc issues with IAudioDevice(wrong ids) 2018-04-21 22:04:24 -07:00
Lioncash ccca5e7c28 service: Use nested namespace specifiers where applicable
Tidies up namespace declarations
2018-04-19 22:20:28 -04:00
Hexagon12 a155d3b7ff
Decimal change 2018-04-10 21:21:00 +03:00
Hexagon12 ee3ca32fa3
Updated CodecCtl with more service names. 2018-04-10 18:58:14 +03:00
Hexagon12 ed2da0ef70
Updated audren with more service names. 2018-04-10 18:56:57 +03:00
Hexagon12 c0011fdacd
Updated audrec with more service names. 2018-04-10 18:53:33 +03:00
Hexagon12 a886e3bc2a
Updated audout with more service names. 2018-04-10 18:51:50 +03:00
Hexagon12 4cf4a5ecdc
Updated audin with more service names. 2018-04-10 18:47:52 +03:00
bunnei 4c0cf3d5ff audren_u: Stub out GetActiveAudioDeviceName. 2018-04-02 23:51:00 -04:00
bunnei 3d4dfefaec audout_u: Implement GetAudioOutState. 2018-04-02 23:51:00 -04:00
bunnei 86095e62cc audren_u: Stub QueryAudioDeviceSystemEvent and GetActiveChannelCount. 2018-03-29 21:23:24 -04:00
bunnei 6f27edccb2 audren_u: Fix GetAudioDevice. 2018-03-25 03:24:20 -04:00
Subv 248881fa7f CoreTiming: Unschedule the pending events when an Interface is destroyed. 2018-03-04 10:34:25 -05:00
mailwl e4f94ee30b Stub more functions 2018-02-22 17:28:15 +03:00
mailwl 6797d4a907 Service/hid: stub some functions 2018-02-16 06:15:05 +03:00
bunnei d6e52581ac audio: Use WriteBuffer instead of BufferDescriptorB. 2018-02-13 23:54:12 -05:00
bunnei 0a55eb588b
audren_u: Schedule reoccuring event. (#183)
* audren_u: Schedule reoccuring event.

* audren_u: Stub GetAudioRenderersProcessMasterVolume, and misc. changes.
2018-02-13 20:47:33 -05:00
gdkchan 3160f83607 Add RequestUpdateAudioRenderer, StartAudioRenderer and StopAudioRenderer stubs to audren:u 2018-02-12 17:44:55 -03:00
mailwl 335096e19a Service: stub some functions in am, audio, time, vi services 2018-02-07 15:11:17 +03:00
bunnei de177f6692 audout_u: Various cleanups. 2018-01-24 22:38:19 -05:00
bunnei 1b1d399e5f hle: Rename RequestBuilder to ResponseBuilder. 2018-01-24 22:24:10 -05:00
bunnei f9dae99006 service: Fix all incorrect IPC response headers. 2018-01-24 22:21:33 -05:00
st4rk 44eb840232 audout:u OpenAudioOut and IAudioOut (#138)
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation

* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation

* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation

* using an enum for audio_out_state as well as changing its initialize to member initializer list

* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass

* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass

* added missing Audio loggin subclass, minor fixes, clang comment breakline

* Solving backend logging conflict

* minor fix

* Fixed duplicated Service NVDRV in backend.cpp, my bad
2018-01-24 22:17:54 -05:00
gdkchan 832009bfdb Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than once 2018-01-22 17:27:55 -03:00
st4rk 07355cf7cc Added stubs for audio services. (#116)
* stubs for audout:u, audin:u, audrec:u, audren:u, codecctl and decoding tables with nullptr for future implementations

* fixing the changes requested (remove private, explicit)
2018-01-21 22:03:36 -05:00
bunnei d81a984d4a audio: Add files to CMake. 2018-01-14 21:45:06 -05:00
bunnei 7a50d56d0e audio: Stub out AudOutU::ListAudioOuts. 2018-01-14 21:45:06 -05:00