summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/audio/audren_u.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Project AndioKelebek12022-07-221-17/+5
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* service: Replace service event creation with ServiceContext::CreateEventMorph2021-10-021-2/+4
| | | | The service context helps to manage all created events and allows us to close them upon destruction.
* audrenbunnei2021-05-111-0/+2
|
* audren_u: Use proper namesgerman772021-04-091-1/+1
|
* service: Eliminate usages of the global system instanceLioncash2020-11-271-1/+0
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* service/audren_u: Handle audio USB output revision queries in ListAudioDeviceName()Lioncash2019-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Audio devices use the supplied revision information in order to determine if USB audio output is able to be supported. In this case, we can only really handle using this revision information in ListAudioDeviceName(), where it checks if USB audio output is supported before supplying it as a device name. A few other scenarios exist where the revision info is checked, such as: - Early exiting from SetAudioDeviceOutputVolume if USB audio is attempted to be set when that device is unsupported. - Early exiting and returning 0.0f in GetAudioDeviceOutputVolume when USB output volume is queried and it's an unsupported device. - Falling back to AHUB headphones in GetActiveAudioDeviceName when the device type is USB output, but is unsupported based off the revision info. In order for these changes to also be implemented, a few other changes to the interface need to be made. Given we now properly handle everything about ListAudioDeviceName(), we no longer need to describe it as a stubbed function.
* service/audren_u: Move revision testing code out of AudRenULioncash2019-07-191-8/+10
| | | | | | | | The revision querying facilities are used by more than just audren. e.g. audio devices can use this to test whether or not USB audio output is supported. This will be used within the following change.
* service/audio: Remove global system accessorsLioncash2019-07-191-1/+7
| | | | Trims out the lingering reliance on global state out of the audio code.
* "AudioRenderer" thread should have a unique nameDavid Marcec2019-07-121-0/+1
| | | | Creating multiple "AudioRenderer" threads cause the previous thread to be overwritten. The thread will name be renamed to AudioRenderer-InstanceX, where X is the current instance number.
* service/audren_u: Handle variadic command buffers in GetWorkBufferSize()Lioncash2019-05-011-0/+1
| | | | | | | | | | | Also introduced in REV5 was a variable-size audio command buffer. This also affects how the size of the work buffer should be determined, so we can add handling for this as well. Thankfully, no other alterations were made to how the work buffer size is calculated in 7.0.0-8.0.0. There were indeed changes made to to how some of the actual audio commands are generated though (particularly in REV7), however they don't apply here.
* service/audren_u: Handle version 2 of performance frame info in GetWorkBufferSize()Lioncash2019-05-011-0/+1
| | | | | | | | Introduced in REV5. This is trivial to add support for, now that everything isn't a mess of random magic constant values. All this is, is a change in data type sizes as far as this function cares.
* service/audio/audren_u: Implement OpenAudioRendererAutoLioncash2019-03-011-0/+3
| | | | | | | This currently has the same behavior as the regular OpenAudioRenderer API function, so we can just move the code within OpenAudioRenderer to an internal function that both service functions call.
* service/audio: Update function tablesLioncash2019-01-301-1/+1
| | | | Updates function tables based off information provided by SwitchBrew.
* service/audio: Replace includes with forward declarations where applicableLioncash2018-09-121-1/+0
| | | | | A few headers were including other headers when a forward declaration can be used instead, allowing the include to be moved to the cpp file.
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
* GetAudioDeviceServiceWithRevisionInfoDavid Marcec2018-08-121-0/+1
| | | | As we're not handling any anything about the revision data for GetAudioDeviceServiceWithRevisionInfo, it's currently marked as stubbed. However for games this shouldn't affect the result. Proper revision info would be more for homebrew.
* audio_core: Implement audren_u audio playback.bunnei2018-08-051-18/+1
|
* Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader (#583)David2018-06-241-2/+2
| | | | | | | | | | * 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
* Fixed RequestUpdateAudioRenderer deadlocks and calculated section sizes properly (#580)David2018-06-231-19/+18
| | | | | * 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
* Service/Audio: update audren:u servicemailwl2018-06-211-3/+3
|
* GetAudioRendererWorkBufferSize impl (#465)David2018-05-261-0/+25
| | | | | | | | | | | | | | | | * 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
* service: Use nested namespace specifiers where applicableLioncash2018-04-201-4/+2
| | | | Tidies up namespace declarations
* audren_u: Fix GetAudioDevice.bunnei2018-03-251-1/+1
|
* audren_u: Schedule reoccuring event. (#183)bunnei2018-02-141-0/+1
| | | | | | * audren_u: Schedule reoccuring event. * audren_u: Stub GetAudioRenderersProcessMasterVolume, and misc. changes.
* Service: stub some functions in am, audio, time, vi servicesmailwl2018-02-071-0/+4
|
* Added stubs for audio services. (#116)st4rk2018-01-221-0/+23
* 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)