summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/audio (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Reimplement HardwareOpusKelebek12023-09-163-333/+426
|
* Rework ADSP into a wrapper for appsKelebek12023-09-044-5/+5
|
* hwopus: Implement GetWorkBufferSizeExExFearlessTobi2023-08-302-1/+6
| | | | | | Allows Sea of Stars to boot. Fixes https://github.com/yuzu-emu/yuzu/issues/11415.
* hwopus: Implement OpenHardwareOpusDecoderForMultiStreamEx and DecodeInterleavedForMultiStreamFearlessTobi2023-08-272-3/+51
| | | | | | Allows MLB The Show 22 to boot. Fixes https://github.com/yuzu-emu/yuzu/issues/7911.
* service: audctl: Stub functions needed by Qlaunchgerman772023-08-062-4/+64
|
* audren_u: Fix parameter alignmentMorph2023-08-011-2/+3
| | | | The reduction in size from 0x38 to 0x34 caused the parameter to be misaligned. Skipping 1 word fixes this.
* general: Use ScratchBuffer where possibleMorph2023-07-014-31/+37
|
* Remove memory allocations in some hot pathsKelebek12023-06-225-35/+28
|
* core: audio: return result when audio_out initialize failedFengChen2023-04-161-6/+8
|
* hle: rename legacy errors to ResultsLiam2023-03-072-15/+15
|
* service: move hle_ipc from kernelLiam2023-03-0110-104/+92
|
* Merge pull request #9832 from liamwhite/hle-mpliamwhite2023-03-015-28/+26
|\ | | | | service: HLE multiprocess
| * service: refactor server architectureLiam2023-02-215-28/+26
| | | | | | | | Converts services to have their own processes
* | core: Update service function tables to 16.0.0+Narr the Reg2023-02-251-0/+2
|/
* Merge pull request #9796 from liamwhite/currentliamwhite2023-02-151-1/+1
|\ | | | | general: rename CurrentProcess to ApplicationProcess
| * general: rename CurrentProcess to ApplicationProcessLiam2023-02-141-1/+1
| |
* | service: remove deleted servicesLiam2023-02-1411-239/+0
|/
* Revert "Merge pull request #9718 from yuzu-emu/revert-9508-hle-ipc-buffer-span"ameerj2023-02-032-2/+2
| | | | | This reverts commit 25fc5c0e1158cb8e81cbc769b24ad84032a1fbfd, reversing changes made to af20e25081f97d55b451606c87922e2b49f0d363.
* Revert "hle_ipc: Use std::span to avoid heap allocations/copies when calling ReadBuffer"liamwhite2023-02-022-2/+2
|
* hle_ipc: Rename ReadBufferSpan to ReadBufferameerj2022-12-294-10/+10
|
* service: Use ReadBufferSpan where it is trivial to do soameerj2022-12-254-11/+11
|
* Revert "hle: service: audio: Use default service thread."bunnei2022-12-143-12/+18
|
* Merge pull request #9232 from bunnei/audio-default-threadliamwhite2022-12-043-18/+12
|\ | | | | hle: service: audio: Use default service thread.
| * hle: service: audio: Use default service thread.bunnei2022-11-123-18/+12
| | | | | | | | - This was arbitrarily added by me, and does not appear to be helpful.
* | Merge pull request #9289 from liamwhite/fruit-companyliamwhite2022-12-031-0/+1
|\ \ | | | | | | general: fix compile for Apple Clang
| * | general: fix compile for Apple ClangLiam2022-11-231-0/+1
| |/
* / service: Make use of buffer element count helpersLioncash2022-11-234-14/+14
|/
* audio_in/out_system: Pass Initialize members by value where applicableLioncash2022-10-262-2/+2
| | | | | | | | | | | applet_resource_user_id isn't actually modified and is just assigned to a member variable, so this doesn't need to be a mutable reference. Similarly, the device name itself isn't modified and is only moved. We pass by value here, since we can still perform the move, but eliminate a sneaky set of calls that can unintentionally destroy the original string. Given how nested the calls are, it's good to get rid of this potential vector for a use-after-move bug.
* Update audio_core for firmware 15.0.0Kelebek12022-10-192-0/+42
|
* kernel: remove KWritableEventLiam2022-10-131-2/+2
|
* Merge pull request #8915 from vonchenplus/opus_multi_streambunnei2022-09-182-1/+38
|\ | | | | core: implement HwOpus GetWorkBufferSizeForMultiStreamEx
| * core: implement HwOpus GetWorkBufferSizeForMultiStreamExFengChen2022-09-162-1/+38
| |
* | audio_device: Mark member functions as const where applicableLioncash2022-09-151-2/+2
| | | | | | | | These member functions don't modify any internal state.
* | audio_device: Make AudioDeviceName constructor constexprLioncash2022-09-151-2/+1
|/ | | | | | | | These are used as read-only arrays, so we can make the data read-only and available at compile-time. Now constructing an AudioDevice no longer needs to initialize some tables
* Implement AudRenU:RequestUpdateAuto, and use C descriptors when B reports as empty.Kelebek12022-08-241-6/+21
|
* Project AndioKelebek12022-07-228-743/+761
|
* core: Replace all instances of ResultCode with Resultgerman772022-06-271-3/+3
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-2327-81/+54
| | | | | 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.
* hle: service: audio: Create a service thread where appropriate.bunnei2022-04-022-4/+6
|
* service/audio: Update audctl unknown function namesLioncash2022-01-211-8/+8
|
* general: Replace high_resolution_clock with steady_clockMorph2021-12-021-2/+2
| | | | On some OSes, high_resolution_clock is an alias to system_clock and is not monotonic in nature. Replace this with steady_clock.
* core: Remove unused includesameerj2021-11-042-4/+0
|
* service: Reduce header include overheadMorph2021-10-074-4/+0
|
* service: Replace service event creation with ServiceContext::CreateEventMorph2021-10-025-41/+55
| | | | The service context helps to manage all created events and allows us to close them upon destruction.
* Merge pull request #7018 from lat9nq/splat-stubsMorph2021-09-292-26/+67
|\ | | | | audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAuto
| * audin_u: Return a buffer event in RegisterBufferEventlat9nq2021-09-152-2/+12
| | | | | | | | Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com>
| * audin_u: stub Start, RegisterBufferEvent, AppendAudioInBufferAutolat9nq2021-09-152-26/+57
| | | | | | | | | | | | This also moves IAudioIn's definition to the header. Required for Splatoon 2 LAN play.
* | service/audio: Update to 13.0.0german772021-09-272-1/+10
|/
* Report 2 channels active. Fixes Tales of Vesperia's mono channel audio.Kelebek12021-07-061-1/+1
|
* Fix XC2/VOEZ crashing, add audio looping and a few misc fixesKelebek12021-07-011-1/+1
|
* Decouple audio processing and run at variable rateKelebek12021-06-271-4/+6
| | | | | | Currently, processing of audio samples is called from AudioRenderer's Update method, using a fixed 4 buffers to process the given samples. Games call Update at variable rates, depending on framerate and/or sample count, which causes inconsistency in audio processing. From what I've seen, 60 FPS games update every ~0.004s, but 30 FPS/160 sample games update somewhere between 0.02 and 0.04, 5-10x slower. Not enough samples get fed to the backend, leading to a lot of audio skipping. This PR seeks to address this by de-coupling the audio consumption and the audio update. Update remains the same without calling for buffer queuing, and the consume now schedules itself to run based on the sample rate and count.
* hle: service: hwopus: OpenHardwareOpusDecoderEx: Remove unused buffer size.bunnei2021-06-261-1/+30
|
* hle: service: hwopus: Implement GetWorkBufferSizeEx and OpenHardwareOpusDecoderEx.bunnei2021-06-252-5/+15
| | | | - This is used by the latest update of Doom Eternal.
* Implement audout GetAudioOutPlayedSampleCountKelebek12021-06-221-1/+9
| | | | Used in Ninja Gaiden games.
* general: Replace RESULT_UNKNOWN with ResultUnknownMorph2021-06-021-2/+2
| | | | Transition to PascalCase for result names.
* general: Replace RESULT_SUCCESS with ResultSuccessMorph2021-06-025-42/+42
| | | | Transition to PascalCase for result names.
* core: Make variable shadowing a compile-time errorLioncash2021-05-162-6/+7
| | | | | | Now that we have most of core free of shadowing, we can enable the warning as an error to catch anything that may be remaining and also eliminate this class of logic bug entirely.
* audrenbunnei2021-05-112-25/+16
|
* hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei2021-05-062-3/+3
|
* hle: kernel: Ensure all kernel objects with KAutoObject are properly created.bunnei2021-05-062-0/+5
|
* hle: kernel: Migrate KEvent to KAutoObject.bunnei2021-05-062-31/+25
|
* service: Resolve cases of member field shadowingLioncash2021-05-041-2/+3
| | | | | Now all that remains is for kernel code to be 'shadow-free' and then -Wshadow can be turned into an error.
* codecctl: Use proper namesgerman772021-04-091-13/+13
|
* audren_u: Use proper namesgerman772021-04-092-4/+4
|
* audren_a: Use proper namesgerman772021-04-091-6/+6
|
* audrec_u: Use proper names, update to 12.xgerman772021-04-091-3/+4
|
* audrec_a: Use proper namesgerman772021-04-091-2/+2
|
* audout_u: Use proper namesgerman772021-04-091-3/+3
|
* audout_a: Use proper namesgerman772021-04-091-6/+6
|
* audin_u: Use proper namesgerman772021-04-091-7/+7
|
* audin_a: Use proper namesgerman772021-04-091-4/+4
|
* hwopus: Update to 12.xMorph2021-04-071-0/+4
|
* hle: kernel: Reimplement KReadableEvent and KWritableEvent.bunnei2021-02-052-23/+27
|
* hle: kernel: Rename WritableEvent to KWritableEvent.bunnei2021-02-052-7/+7
|
* hle: kernel: Rename ReadableEvent to KReadableEvent.bunnei2021-02-052-2/+2
|
* audout: FlushAudioOutBuffersChloe Marcec2021-01-241-1/+9
| | | | Fixes Devil May Cry
* core: Silence Wclass-memaccess warningsReinUsesLisp2021-01-151-1/+1
| | | | | This requires making several types trivial and properly initialize them whenever they are called.
* hle: service: Acquire and release a lock on requests.bunnei2020-12-292-9/+11
| | | | - This makes it such that we can safely access service members from CoreTiming thread.
* service: Eliminate usages of the global system instanceLioncash2020-11-2725-59/+87
| | | | | Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
* Revert "core: Fix clang build"bunnei2020-10-212-19/+17
|
* core: Fix clang buildLioncash2020-10-182-17/+19
| | | | | | | Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
* Merge pull request #4310 from ogniK5377/apollo-1-prodbunnei2020-09-111-72/+77
|\ | | | | audio_core: Apollo Part 1, AudioRenderer refactor
| * audio_core: Apollo Part 1, AudioRenderer refactorDavid Marcec2020-07-251-72/+77
| |
* | General: Tidy up clang-format warnings part 2Lioncash2020-08-131-1/+1
| |
* | yuzu: Resolve C++20 deprecation warnings related to lambda capturesLioncash2020-08-031-1/+1
| | | | | | | | | | C++20 deprecates capturing the this pointer via the '=' capture. Instead, we replace it or extend the capture specification.
* | ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465)David2020-08-031-1/+1
|/ | | | | | | | | | | | | * ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer With the support of C++20, we can use concepts to deduce if a type is an STL container or not. * More agressive concept for stl containers * Add -fconcepts * Move to common namespace * Add Common::IsBaseOf
* marked stubsDavid Marcec2020-04-281-4/+5
|
* Audin:u ListAudioIns, OpenAudioIn, ListAudioInsAuto, OpenAudioInAuto, ListAudioInsAutoFiltered, OpenAudioInProtocolSpecifiedDavid Marcec2020-04-282-5/+93
| | | | Closes #2874
* Merge pull request #3744 from lioncash/table2bunnei2020-04-261-0/+2
|\ | | | | service: Update function tables
| * service: Update function tablesLioncash2020-04-201-0/+2
| | | | | | | | | | | | Keeps the service function tables up to date. Updated based off information on SwitchBrew.
* | audio_renderer: Preliminary BehaviorInfo (#3736)David2020-04-211-2/+7
|/ | | | | | | | | | | | | * audio_renderer: Preliminary BehaviorInfo * clang format * Fixed IsRevisionSupported * fixed IsValidRevision * Fixed logic error & spelling errors & crash * Addressed issues
* audren: Lower log level for RequestUpdateImpl to DebugFearlessTobi2020-04-201-1/+1
|
* service: Remove unused RequestParser instancesLioncash2020-04-181-2/+0
| | | | | These aren't used, so they should be removed to reduce compilation warnings.
* core: memory: Move to Core::Memory namespace.bunnei2020-04-171-1/+1
| | | | - helpful to disambiguate Kernel::Memory namespace.
* CMakeLists: Specify -Wextra on linux buildsLioncash2020-04-161-1/+1
| | | | | | | | | | | Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
* update hwopus DecodeInterleaved for FW 7.0.0+makigumo2020-02-111-2/+4
| | | | trivial change, see https://switchbrew.org/wiki/Audio_services#IHardwareOpusDecoder
* core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash2019-11-271-2/+4
| | | | | | | | | | | | | | With all of the trivial parts of the memory interface moved over, we can get right into moving over the bits that are used. Note that this does require the use of GetInstance from the global system instance to be used within hle_ipc.cpp and the gdbstub. This is fine for the time being, as they both already rely on the global system instance in other functions. These will be removed in a change directed at both of these respectively. For now, it's sufficient, as it still accomplishes the goal of de-globalizing the memory code.
* core: Prepare various classes for memory read/write migrationLioncash2019-11-271-2/+3
| | | | | | | | | | Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us.
* Merge pull request #3094 from lioncash/tablesbunnei2019-11-251-0/+1
|\ | | | | service: Update function tables
| * service: Update function tablesLioncash2019-11-121-0/+1
| | | | | | | | | | | | Keeps the function tables up to date. Updated based off information from Switchbrew.
* | service: Resolve sign conversion errorsLioncash2019-11-121-2/+2
|/ | | | | These are fairly trivial to resolve and most of the changes entail using RESULT_UNKNOWN over ResultCode(-1).
* kernel: events: Remove ResetType::Automatic.bunnei2019-11-032-8/+8
| | | | | | | | - This does not actually seem to exist in the real kernel - games reset these automatically. # Conflicts: # src/core/hle/service/am/applets/applets.cpp # src/core/hle/service/filesystem/fsp_srv.cpp
* audio/audout_u: Change formatting for old clang-format versionsReinUsesLisp2019-10-051-1/+1
|
* service/audio: Silence -WunusedReinUsesLisp2019-10-051-1/+1
|
* Merge pull request #2834 from Morph1984/audrenu_QueryAudioDeviceInputEventDavid2019-09-051-1/+15
|\ | | | | audren_u: Stub IAudioDevice::QueryAudioDeviceInputEvent
| * Add Kernel::EventPair audio_input_device_switch_event;Morph19842019-09-041-0/+1
| |
| * audren_u: Stub IAudioDevice::QueryAudioDeviceInputEventMorph19842019-09-041-1/+14
| |
* | remove <f32>Morph19842019-09-041-1/+1
| | | | | | We can remove this since its already a f32 value
* | explicitly represent 1 as a float (1.0f instead of 1)Morph19842019-09-041-1/+1
| |
* | Change u32 -> f32Morph19842019-09-041-1/+1
| | | | | | | | | | | | | | Volume is a f32 value. (SwIPC describes it as a u32, but it is actually f32 as corroborated by switchbrew docs and SetAudioDeviceOutputVolume) ```cpp const f32 volume = rp.Pop<f32>(); ```
* | service/audio/audren_u: Stub IAudioDevice::GetAudioDeviceOutputVolumeMorph19842019-09-031-2/+15
|/
* service/audren_u: Handle audio USB output revision queries in ListAudioDeviceName()Lioncash2019-07-192-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-192-63/+63
| | | | | | | | 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-196-33/+53
| | | | Trims out the lingering reliance on global state out of the audio code.
* service/audren_u: Remove unnecessary return value from GetActiveAudioDeviceName()Lioncash2019-07-191-2/+1
| | | | This service function only ever returns a result and nothing more.
* service/audren_u: Report proper device namesLioncash2019-07-191-6/+29
| | | | | | | | | | AudioDevice and AudioInterface aren't valid device names on the Switch. We should also be returning consistent names in GetActiveAudioDeviceName(). While we're at it, we can also handle proper name output in ListAudioDeviceName, by returning all the available devices on the Switch.
* Clang formatDavid Marcec2019-07-121-2/+4
|
* "AudioRenderer" thread should have a unique nameDavid Marcec2019-07-122-4/+4
| | | | 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.
* IAudioDevice::QueryAudioDeviceOutputEventDavid Marcec2019-07-011-3/+16
| | | | The event should only be signaled when an output audio device gets changed. Example, Speaker to USB headset. We don't identify different devices internally yet so there's no need to signal the event yet.
* Revert PR 2590.Fernando Sahmkow2019-06-201-1/+1
| | | | | | | | | Even though it has been proven that IAudioRenderer:SystemEvent is actually an automatic event. The current implementation of such event is all thought to be manual. Thus it's implementation needs to be corrected when doing such change. As it is right now this PR introduced a series of regressions on softlocks on multiple games. Therefore, this pr reverts such change until a correct implementation is made.
* Merge pull request #2590 from lioncash/eventbunnei2019-06-201-1/+1
|\ | | | | service/audio/audren_u: Correct event reset type for the system event
| * service/audio/audren_u: Correct event reset type for the system eventLioncash2019-06-181-1/+1
| | | | | | | | | | This is actually an auto-reset event in the audio service itself, not a manual one.
* | CleanupDavid Marcec2019-06-161-2/+2
| |
* | Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEventDavid Marcec2019-06-161-2/+21
|/ | | | IPC-100 was changed to InitializeApplicationInfoOld instead of InitializeApplicationInfo. IPC-150 makes an indentical call to IPC-100 however does extra processing. They should not have the same name as it's quite confusing to debug.
* Merge pull request #2439 from lioncash/audrenHexagon122019-05-192-51/+299
|\ | | | | service/audren_u: Get rid of magic values within GetAudioRendererWorkBufferSize
| * service/audren_u: Handle variadic command buffers in GetWorkBufferSize()Lioncash2019-05-012-17/+93
| | | | | | | | | | | | | | | | | | | | | | 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-012-6/+13
| | | | | | | | | | | | | | | | 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/audren_u: Clean up work buffer calculationsLioncash2019-05-011-49/+214
| | | | | | | | | | | | "Unmagics" quite a few magic constants within this code, making it much easier to understand. Particularly given this factors out specific sections into their own self-contained lambda functions.
* | core/kernel/object: Rename ResetType enum membersLioncash2019-05-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Renames the members to more accurately indicate what they signify. "OneShot" and "Sticky" are kind of ambiguous identifiers for the reset types, and can be kind of misleading. Automatic and Manual communicate the kind of reset type in a clearer manner. Either the event is automatically reset, or it isn't and must be manually cleared. The "OneShot" and "Sticky" terminology is just a hold-over from Citra where the kernel had a third type of event reset type known as "Pulse". Given the Switch kernel only has two forms of event reset types, we don't need to keep the old terminology around anymore.
* | service/audctl: Update documentation comments to be relative to 8.0.0Lioncash2019-04-281-2/+2
|/ | | | The state of these service calls are still the same in version 8.0.0.
* service/audctl: Implement GetTargetVolumeMin() and GetTargetVolumeMax()Lioncash2019-04-182-2/+32
| | | | | These two service functions are literally hardcoded to always return these values without any other error checking.
* service: Update service function tablesLioncash2019-04-112-1/+5
| | | | Updates function tables based off information from SwitchBrew.
* Merge pull request #2334 from lioncash/overridebunnei2019-04-062-8/+0
|\ | | | | core: Add missing override specifiers where applicable
| * core: Add missing override specifiers where applicableLioncash2019-04-042-8/+0
| | | | | | | | | | | | | | | | | | Applies the override specifier where applicable. In the case of destructors that are defaulted in their definition, they can simply be removed. This also removes the unnecessary inclusions being done in audin_u and audrec_u, given their close proximity.
* | hle/service: Resolve unused variable warningsLioncash2019-04-042-11/+6
|/ | | | | | | | | In several places, we have request parsers where there's nothing to really parse, simply because the HLE function in question operates on buffers. In these cases we can just remove these instances altogether. In the other cases, we can retrieve the relevant members from the parser and at least log them out, giving them some use.
* hwopus: Leverage multistream API for decoding regular Opus packetsLioncash2019-03-111-34/+48
| | | | | | | | | | | | | After doing a little more reading up on the Opus codec, it turns out that the multistream API that is part of libopus can handle regular packets. Regular packets are just a degenerate case of multistream Opus packets, and all that's necessary is to pass the number of streams as 1 and provide a basic channel mapping, then everything works fine for that case. This allows us to get rid of the need to use both APIs in the future when implementing multistream variants in a follow-up PR, greatly simplifying the code that needs to be written.
* Merge pull request #2207 from lioncash/hwopusbunnei2019-03-101-69/+107
|\ | | | | service/audio/hwopus: Move decoder state to its own class
| * service/audio/hwopus: Move decoder state to its own classLioncash2019-03-071-50/+85
| | | | | | | | | | Moves the non-multistream specific state to its own class. This will be necessary to support the multistream variants of opus decoding.
| * service/audio/hwopus: Provide a name for the second word of OpusPacketHeaderLioncash2019-03-071-2/+4
| | | | | | | | This indicates the entropy coder's final range.
| * service/audio/hwopus: Move Opus packet header out of the IHardwareOpusDecoderManagerLioncash2019-03-071-17/+17
| | | | | | | | | | | | This will be utilized by more than just that class in the future. This also renames it from OpusHeader to OpusPacketHeader to be more specific about what kind of header it is.
| * service/audio/hwopus: Enclose internals in an anonymous namespaceLioncash2019-03-071-2/+3
| | | | | | | | | | Makes it impossible to violate the ODR, as well as providing a place for future changes.
* | service/audio/audout_u: Only actually stop the audio stream in StopAudioOut if the stream is playingLioncash2019-03-071-1/+3
|/ | | | | The service itself only does further actions if the stream is playing. If the stream is already stopped, then it just exits successfully.
* hle/service/audio/audout_u: Correct lack of return in failure case of AppendAudioOutBufferImpl()Lioncash2019-03-061-0/+1
| | | | | Previously we were overwriting the error case with a success code further down (which is definitely not what we should be doing here).
* hle/service/audio: Extract audio error codes to a headerLioncash2019-03-053-10/+20
| | | | | | | Places all error codes in an easily includable header. This also corrects the unsupported error code (I accidentally used the hex value when I meant to use the decimal one).
* Merge pull request #2180 from lioncash/audrenbunnei2019-03-011-1/+12
|\ | | | | service/audio: Provide an implementation of ExecuteAudioRendererRendering
| * service/audio: Provide an implementation of ExecuteAudioRendererRenderingLioncash2019-03-011-1/+12
| | | | | | | | | | | | | | This service function appears to do nothing noteworthy on the switch. All it does at the moment is either return an error code or abort the system. Given we obviously don't want to kill the system, we just opt for always returning the error code.
* | service/audio/audren_u: Implement OpenAudioRendererAutoLioncash2019-03-012-7/+20
|/ | | | | | | 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.
* audio_core/audio_renderer: Name previously unknown parameters of AudioRendererParameterLioncash2019-02-271-13/+13
| | | | | | | | | Provides names for previously unknown entries (aside from the two u8 that appear to be padding bytes, and a single word that also appears to be reserved or padding). This will be useful in subsequent changes when unstubbing behavior related to the audio renderer services.
* core_timing: Convert core timing into a classLioncash2019-02-162-9/+10
| | | | | | | | | | | Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
* Merge pull request #2073 from lioncash/opusbunnei2019-02-011-42/+75
|\ | | | | hwopus: Implement DecodeInterleaved (the newest variant)
| * hwopus: Implement DecodeInterleavedLioncash2019-01-301-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | This functions almost identically to DecodeInterleavedWithPerfOld, however this function also has the ability to reset the decoder context. This is documented as a potentially desirable thing in the libopus manual in some circumstances as it says for the OPUS_RESET_STATE ctl: "This should be called when switching streams in order to prevent the back to back decoding from giving different result from one at a time decoding."
| * hwopus: Deduplicate the decoding code within DecodeInterleavedOld and DecodeInterleavedWithPerfOldLioncash2019-01-301-19/+14
| | | | | | | | Keeps the logic in one spot for use by both functions.
| * hwopus: Replace std::optional<std::reference_wrapper<u64>> with u64*Lioncash2019-01-301-9/+6
| | | | | | | | | | This doesn't really offer anything over the use of a direct pointer, so we can just use that instead.
| * hwopus: Mark local variables as const where applicableLioncash2019-01-301-8/+16
| | | | | | | | Makes non-mutable state more explicit.
| * hwopus: Fill in the rest of the unknown service function namesLioncash2019-01-301-9/+11
| | | | | | | | Filled in via information provided by SwitchBrew.
* | service/audio: Update function tablesLioncash2019-01-304-8/+23
|/ | | | Updates function tables based off information provided by SwitchBrew.
* Merge pull request #1803 from DarkLordZach/k-able-eventbunnei2018-12-032-19/+24
|\ | | | | kernel: Divide Event into ReadableEvent and WritableEvent
| * kernel/event: Reference ReadableEvent from WritableEventZach Hilman2018-11-292-23/+18
| |
| * core: Port all current usages of Event to Readable/WritableEventZach Hilman2018-11-292-14/+24
| |
* | service/audio/audout_u: Amend constructor initialization list orderLioncash2018-12-021-2/+2
|/ | | | | Orders the constructor initializer list the same way the members of the class are declared. Prevents -Wreorder warnings
* Fixed hwopus compile errorDavid Marcec2018-11-261-1/+1
|
* Improved error messages in AM, HwOpus and NvMapDavid Marcec2018-11-261-8/+16
|
* Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec2018-11-263-30/+60
|
* audout_u: Add support for multiple IAudioOut streams.bunnei2018-11-222-9/+22
| | | | - Used by Undertale.
* hwopus: DecodeInterleavedWithPerformance: Fix ordering of output parameters.bunnei2018-11-171-1/+1
| | | | - Fixes audio issues with Pokemon: Let's Go Pikachu & Eevee.
* service/audren_u: Forward RequestUpdateAuto through the same function as RequestUpdateLioncash2018-11-141-3/+3
| | | | | Based off RE, they both currently go through the same codepath with no difference in behavior.
* hle/audren_u: Implement Get/SetRenderingTimeLimitLioncash2018-11-131-2/+23
| | | | | These appear to be a basic getter and setter pair, so these are fairly trivial to implement and get out of the way.
* Fixed incorrect hwopus assertDavid Marcec2018-11-021-1/+1
|
* audio: Update service function tablesLioncash2018-10-191-17/+20
| | | | Updated based off information provided by Switchbrew.
* HwOpus, Implemented DecodeInterleavedWithPerformanceDavid Marcec2018-10-111-3/+34
| | | | Used by sonic ages
* Merge pull request #1394 from lioncash/streambunnei2018-09-271-1/+1
|\ | | | | stream: Preserve enum class type in GetState()
| * stream: Preserve enum class type in GetState()Lioncash2018-09-241-1/+1
| | | | | | | | | | | | Preserves the meaning/type-safetiness of the stream state instead of making it an opaque u32. This makes it usable for other things outside of the service HLE context.
* | service: Add missing headers inclusions where applicableLioncash2018-09-251-0/+1
|/ | | | Gets rid of a few indirect inclusions.
* Added audren:u#GetAudioRendererStateDavid Marcec2018-09-231-1/+8
|
* Removed the use of rp.MakeBuilderDavid Marcec2018-09-192-4/+4
| | | | Due to keeping the code style consistent in the yuzu codebase. `rb = rp.MakeBuilder(...)` was replaced with `rb{ctx, ...}`
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-3/+3
|
* service/audio: Replace includes with forward declarations where applicableLioncash2018-09-127-17/+34
| | | | | 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-1124-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* kernel: Eliminate kernel global stateLioncash2018-08-292-4/+8
| | | | | | | | | | | | | | | | | | | | | | As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
* audout_u: Correct IAudioOut initializer list orderLioncash2018-08-141-1/+1
| | | | Orders elements in the precise order they'll be initialized.
* Merge pull request #1035 from ogniK5377/audio-dev-revision-infobunnei2018-08-122-1/+13
|\ | | | | GetAudioDeviceServiceWithRevisionInfo (Used by Bloodstained: Curse of the Moon)
| * GetAudioDeviceServiceWithRevisionInfoDavid Marcec2018-08-122-1/+13
| | | | | | | | 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.
* | Pushed the requested sample rate instead of our fixed sample rateDavid Marcec2018-08-121-4/+2
| |
* | Added GetAudioRendererSampleRate, GetAudioRendererSampleCount & GetAudioRendererMixBufferCountDavid Marcec2018-08-121-5/+28
|/ | | | GetAudioRendererSampleRate is set as a "STUB" as a game could check if the sample rate it sent and the sample rate it wants don't match. Just a thought of something which could happen so keeping it as stub for the mean time
* Service/Audio: audout_a.cpp: remove pragma oncemailwl2018-08-061-2/+0
|
* Merge pull request #925 from bunnei/audrenbunnei2018-08-064-233/+16
|\ | | | | Implement audren audio output
| * audio_core: Implement audren_u audio playback.bunnei2018-08-052-218/+9
| |
| * audio_core: Use s16 where possible for audio samples.bunnei2018-08-051-3/+3
| |
| * audio_core: Port codec code from Citra for ADPCM decoding.bunnei2018-08-052-11/+3
| |
| * audio_core: Streams need unique names for CoreTiming.bunnei2018-08-041-1/+1
| |
* | service: Remove redundant #pragma once directivesLioncash2018-08-043-6/+0
|/ | | | | These don't do anything within .cpp files (we don't include cpp files, so...)
* Merge pull request #880 from lioncash/audiobunnei2018-08-0113-0/+277
|\ | | | | service/audio: Add missing services
| * service/audio: Add missing servicesLioncash2018-08-0113-0/+277
| | | | | | | | | | Adds the missing audctl service, as well as the :a and :d services for audin, audout, audrec, and audren.
* | audout_u: Remove std::move in OpenAudioOutImpl()Lioncash2018-07-311-1/+1
|/ | | | | | | Previously the code was using the values from params further below after it was std::moved. Thankfully, given AudoutParams is a trivially copyable struct, the values would have simply been copied in this instance and not invalidated to garbage values.
* audio_core: Move to audout_u impl.bunnei2018-07-312-4/+6
| | | | - This is necessary so streams are created on the same thread.
* Implemented various hwopus functions (#853)David2018-07-312-5/+131
|
* audout: Implement IAudioOut interface with AudioCore.bunnei2018-07-282-93/+114
|
* core_timing: Split off utility functions into core_timing_utilMerryMage2018-07-242-0/+2
|
* audren_u: Use a std::array instead of std::string for holding the audio interface/device nameLioncash2018-07-201-2/+4
| | | | | 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
* audout_u: Use a std::array instead of std::string for holding the audio interface nameLioncash2018-07-201-1/+2
| | | | | | 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.
* Merge pull request #726 from lioncash/overloadbunnei2018-07-202-3/+3
|\ | | | | hle_ipc: Introduce generic WriteBuffer overload for multiple container types
| * hle_ipc: Introduce generic WriteBuffer overload for multiple container typesLioncash2018-07-192-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | hle/service: Make constructors explicit where applicableLioncash2018-07-191-2/+2
|/ | | | | Prevents implicit construction and makes these lingering non-explicit constructors consistent with the rest of the other classes in services.
* We only need to alert for memory pool changesDavid Marcec2018-07-131-2/+0
|
* initialized voice status and unused sizes in the update data headerDavid Marcec2018-07-131-1/+3
|
* Audout "Auto" functionsDavid Marcec2018-07-122-14/+14
| | | | Audout autos are identical to their counterpart except for the buffer type which yuzu already handles for us.
* Update AudioRenderer Voice Sections (#614)David2018-07-031-0/+87
| | | | | | | | * voice section updating * fixed slight offset miscalculation * fixed overflow
* Rename logging macro back to LOG_*James Rowe2018-07-033-21/+21
|
* Merge pull request #588 from mailwl/hwopusbunnei2018-06-283-0/+51
|\ | | | | Service/Audio: add hwopus service, stub GetWorkBufferSize function
| * Service/Audio: add hwopus service, stub GetWorkBufferSize functionmailwl2018-06-253-0/+51
| |
* | Send the correct RequestUpdateAudioRenderer revision in the output header (#587)David2018-06-251-1/+1
|/ | | | | | | | * We should be returning our revision instead of what is requested. Hardware test on a 5.1.0 console * Added sysversion comment
* Removed duplicate structs, changed AudioRendererResponse -> UpdateDataHeader (#583)David2018-06-242-34/+21
| | | | | | | | | | * 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-232-44/+76
| | | | | * 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-212-49/+60
|
* Build: Fixed some MSVC warnings in various parts of the code.Subv2018-06-201-1/+1
|
* GetAudioRendererWorkBufferSize impl (#465)David2018-05-262-2/+88
| | | | | | | | | | | | | | | | * 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
* Correct audio command numbers & add or rename some functions (#455)greggameplayer2018-05-215-34/+34
| | | | | | | | | | | | | | * 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
* core_timing: Namespace all functions and constants in core_timing's headerLioncash2018-04-302-2/+2
| | | | All of these variables and functions are related to timings and should be within the namespace.
* Merge branch 'master' of https://github.com/yuzu-emu/yuzu into service-implDavid Marcec2018-04-262-21/+21
|\
| * audio: Move logging macros over to new fmt-compatible onesLioncash2018-04-242-21/+21
| |
* | GetIUserInterface->CreateUserInterface, Added todos and stub logs. Playreport->PlayReport.David Marcec2018-04-231-5/+3
| |
* | Implemented GetIUserInterface properly, Playreport and SSL::SetInterfaceVersion. Fixed ipc issues with IAudioDevice(wrong ids)David Marcec2018-04-221-6/+9
|/
* service: Use nested namespace specifiers where applicableLioncash2018-04-2012-48/+24
| | | | Tidies up namespace declarations
* Decimal changeHexagon122018-04-101-4/+4
|
* Updated CodecCtl with more service names.Hexagon122018-04-101-3/+3
|
* Updated audren with more service names.Hexagon122018-04-101-10/+14
|
* Updated audrec with more service names.Hexagon122018-04-101-7/+9
|
* Updated audout with more service names.Hexagon122018-04-101-13/+16
|
* Updated audin with more service names.Hexagon122018-04-101-9/+16
|
* audren_u: Stub out GetActiveAudioDeviceName.bunnei2018-04-031-1/+13
|
* audout_u: Implement GetAudioOutState.bunnei2018-04-031-1/+8
|
* audren_u: Stub QueryAudioDeviceSystemEvent and GetActiveChannelCount.bunnei2018-03-301-8/+36
|
* audren_u: Fix GetAudioDevice.bunnei2018-03-252-7/+48
|
* CoreTiming: Unschedule the pending events when an Interface is destroyed.Subv2018-03-042-2/+6
|
* Stub more functionsmailwl2018-02-221-2/+2
|
* Service/hid: stub some functionsmailwl2018-02-161-1/+2
|
* audio: Use WriteBuffer instead of BufferDescriptorB.bunnei2018-02-142-9/+3
|
* audren_u: Schedule reoccuring event. (#183)bunnei2018-02-142-6/+36
| | | | | | * audren_u: Schedule reoccuring event. * audren_u: Stub GetAudioRenderersProcessMasterVolume, and misc. changes.
* Add RequestUpdateAudioRenderer, StartAudioRenderer and StopAudioRenderer stubs to audren:ugdkchan2018-02-121-2/+76
|
* Service: stub some functions in am, audio, time, vi servicesmailwl2018-02-072-4/+51
|
* audout_u: Various cleanups.bunnei2018-01-251-29/+17
|
* hle: Rename RequestBuilder to ResponseBuilder.bunnei2018-01-251-7/+7
|
* service: Fix all incorrect IPC response headers.bunnei2018-01-251-1/+1
|
* audout:u OpenAudioOut and IAudioOut (#138)st4rk2018-01-252-14/+166
| | | | | | | | | | | | | | | | | | | | | | * 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
* Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than oncegdkchan2018-01-222-1/+15
|
* Added stubs for audio services. (#116)st4rk2018-01-2211-5/+299
| | | | | | * 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)
* audio: Add files to CMake.bunnei2018-01-151-1/+0
|
* audio: Stub out AudOutU::ListAudioOuts.bunnei2018-01-154-0/+82