summaryrefslogtreecommitdiffstats
path: root/src/audio_core (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-02-23oboe_sink: handle temporary stream creation failureLiam1-2/+6
2024-02-23audio: fix released buffer bounds checkLiam1-2/+6
2024-02-21audio: formatLiam3-7/+8
2024-02-21audio: rewrite IAudioDeviceLiam2-12/+8
2024-02-21audio: rewrite IHardwareOpusDecoderManagerLiam6-31/+34
2024-02-21audio: rewrite IAudioRendererManagerLiam8-39/+45
2024-02-21audio: rewrite IAudioOutLiam1-2/+2
2024-02-21audio: rewrite IAudioInManagerLiam2-7/+4
2024-02-19scope_exit: Make constexprFearlessTobi2-3/+5
Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
2024-01-28Use the input process handle to get the correct application's memoryKelebek19-15/+46
2024-01-27Move time services to new IPC.Kelebek11-2/+2
Add some fixes/improvements to usage with the new IPC
2024-01-19Core: Clang format and other small issues.Fernando Sahmkow2-2/+2
2024-01-19SMMU: Initial adaptation to video_core.Fernando Sahmkow2-0/+2
2024-01-16Fix more typosViktor Szépe5-10/+10
2024-01-12audio: fetch process object from handle tableLiam6-22/+36
2023-12-23core_timing: remove user data valueLiam1-3/+1
2023-12-18oboe_sink: specify additional required parametersLiam1-13/+27
2023-12-18oboe_sink: set low latency performance modeLiam1-0/+2
2023-12-17oboe_sink: implement channel count queryingLiam1-12/+35
2023-12-17android: add oboe audio sinkLiam4-0/+283
2023-12-16audio: skip coefficient normalization for downmixLiam1-4/+2
2023-12-16Have GetActiveChannelCount return the system channels instead of host device channelsKelebek14-19/+42
2023-11-17opus: fix stereo stream count check in multistream decoder objectLiam2-2/+2
2023-11-13audio_core: ignore renderer wait when stream is pausedLiam4-4/+18
2023-11-04Convert files to LF eolKelebek18-876/+876
2023-11-03Allow 0 stereo countKelebek12-3/+3
2023-10-13audio: fix shutdown deadlock in audio rendererLiam1-0/+4
2023-10-10Clear DSP buffer after each executionKelebek12-0/+11
2023-10-03ci: fix new codespell errorsLiam1-1/+1
2023-09-18Do not consider voice commands in time estimation, fix adpcm estimateKelebek12-6/+8
2023-09-16Reimplement HardwareOpusKelebek120-72/+1465
2023-09-08Fix data source version 1 command loopingKelebek14-52/+72
2023-09-07Do not reset the command buffer command count each timeKelebek15-27/+14
2023-09-04Rework ADSP into a wrapper for appsKelebek1169-1252/+1046
2023-09-03msvc: set warning level to /W4 globallyDanila Malyutin1-1/+0
And fix a bunch of warnings
2023-08-28Fix node id index in DropVoicesKelebek11-1/+1
2023-08-27audio: allow more latency in cubeb initializationLiam2-8/+3
2023-08-23Pre-test opening a stream for audio backends, fall back to null if not suitable.Kelebek15-38/+117
2023-07-30Fix AudioRendererParameterInternal's sizeKelebek11-3/+3
2023-07-21(ui,)settings: Use explicit instantiationlat9nq1-3/+2
Reduces compile times a tad on clang.
2023-07-21settings,general: Rename non-confirming enumslat9nq1-2/+3
2023-07-21configure_audio: Implement ui generationlat9nq2-19/+23
Needs a considerable amount of management specific to some of the comoboboxes due to the audio engine configuration. general: Partial audio config implmentation configure_audio: Implement ui generation Needs a considerable amount of management specific to some of the comoboboxes due to the audio engine configuration. general: Partial audio config implmentation settings: Make audio settings as enums
2023-07-03Use spans over guest memory where possible instead of copying data.Kelebek13-77/+32
2023-06-30sink_stream: Resolve heap buffer corruption due to out of bounds writeMorph2-17/+20
Also, remove the use of ScratchBuffer when upmixing, as other channels may not be initialized with zeroed out data.
2023-06-22Remove memory allocations in some hot pathsKelebek120-73/+80
2023-06-08nvnflinger: allow locking framerate during video playbackLiam2-22/+0
2023-06-08core_timing: Use CNTPCT as the guest CPU tickMorph5-15/+8
Previously, we were mixing the raw CPU frequency and CNTFRQ. The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
2023-06-06android: audio_core: sink_stream: Remove unnecessary check.bunnei1-3/+0
2023-06-04audio_renderer: resolve adsp thread deadlock shutdownLiam4-10/+12
2023-06-03android: audio_core: Avoid shutdown hang.bunnei1-0/+3
2023-05-27Audren wait as suggested by ByLawsKelebek11-0/+3
2023-05-18Smooth out the DSP callback by adding a 5ms wait time limitKelebek14-16/+12
2023-05-05yuzu-sdl,audio_core: Remove antiquated warning ignorelat9nq1-10/+1
Issue was fixed a long time ago, both by SDL2 and in yuzu by including SDL2 as a system library.
2023-05-01Wait for the terminate event before destroying a system instanceKelebek11-4/+1
2023-04-08Use GetGlobalTimeNs as opposed to clock ticksBilly Laws2-4/+3
2023-04-04Add some explicit latency to sample count reportingBilly Laws1-1/+2
Some games have very tight scheduling requirements for their audio which can't really be matched on the host, adding a constant to the reported value helps to provide some leeway.
2023-03-27audio_core: No longer stall when sink queue is fullBilly Laws4-64/+1
Now the audout and audren update rates are tied to the sink status stalling is no longer necessary.
2023-03-27Run clang-formatBilly Laws3-7/+6
2023-03-27audio: Wait for samples on the emulated DSP side to avoid desyncsBilly Laws6-24/+28
Waiting on the host side is inaccurate and leads to desyncs in the event of the sink missing a deadline that require stalls to fix. By waiting for the sink to have space before even starting rendering such desyncs can be avoided.
2023-03-26audio: Interpolate system manager sample count using host sink sample infoBilly Laws4-3/+39
This avoids the need to stall if the host sink sporadically misses the deadline, in such a case the previous implementation would report them samples as being played on-time, causing the guest to send more samples and leading to a gradual buildup.
2023-03-24memory: rename global memory references to application memoryLiam4-6/+5
2023-03-12general: fix spelling mistakesLiam16-27/+27
2023-03-08core: Promote CPU/GPU threads to time criticalMorph1-1/+1
And also demote Audren and CoreTiming to High thread priority.
2023-03-07hle: rename legacy errors to ResultsLiam13-64/+64
2023-03-02Fix a bug with the Reverb command in reading from the pre_delay line.Kelebek13-6/+8
2023-02-14remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistencyarades7912-39/+39
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14add static lifetime to constexpr values to force compile time evaluation where possiblearades7912-39/+39
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14general: rename CurrentProcess to ApplicationProcessLiam2-3/+3
2023-02-13Fix biquad filter command's state buffer offsetKelebek11-2/+2
2023-02-11Add fallback for memory read/write in case the address goes over a 4K pageKelebek11-12/+64
2023-02-11Fix depop prepare receiving bad mix infos and writing out of bounds, and update aux a bit, may helpKelebek12-40/+40
2023-02-10biquad_filter: Clamp f64 in ApplyBiquadFilterFloatMerry1-3/+3
2023-02-10biquad_filter: Fix rounding in ApplyBiquadFilterIntMerry2-24/+16
2023-02-10audio: cubeb: Fix yuzu crashing when it test for latencyNarr the Reg1-0/+20
2023-01-14upsample: Fix coefficient formatMerry1-26/+26
2023-01-14audio_core: Fix off-by-one error in upsamplerMerry1-33/+12
2022-12-28cmake: make cubeb and SDL2 optionalLiam1-6/+13
2022-12-16Signal buffer event on audio in/out system stop, and force remove all registered audio buffersKelebek15-7/+26
2022-12-10audio_core: remove explicitly defaulted and implicitly deleted constructorsLiam2-2/+0
2022-12-06cmake: use sdl2 imported targetAlexandre Bouvier1-5/+1
2022-12-04cmake: prefer system librariesAlexandre Bouvier1-2/+2
2022-12-01CMake: Consolidate common PCH headersameerj1-7/+1
2022-11-30audio_core: sink_stream: Hold the suspend lock when process is stalled.bunnei2-7/+9
- Prevents us from clashing with other callers trying to un/stall.
2022-11-30CMake: Use precompiled headersameerj2-0/+17
2022-11-29CMake: Directly link to SDL2-static when appropriatelat9nq1-1/+5
Trying to be lazy and alias SDL2 to SDL2-static causes issues in later versions of CMake. Just use the same condition to tell which one to use.
2022-11-23general: fix compile for Apple ClangLiam9-4/+14
2022-11-22Use the maximum input index for samples buffer span size, not just the input countKelebek11-6/+8
2022-11-14Add break for default casesKyle Kienapfel1-0/+1
Visual Studio has an option to search all files in a solution, so I did a search in there for "default:" looking for any missing break statements. I've left out default statements that return something, and that throw something, even if via ThrowInvalidType. UNREACHABLE leads towards throw R_THROW macro leads towards a return
2022-11-09Initial ARM64 supportLiam1-1/+1
2022-10-26audio_in/out_system: Pass Initialize members by value where applicableLioncash4-6/+6
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.
2022-10-22general: Resolve -Wclass-memaccessMorph3-3/+3
2022-10-22general: Enforce C4800 everywhere except in video_coreMorph1-0/+1
2022-10-22CMakeLists: Remove all redundant warningsMorph1-10/+0
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-19Update audio_core for firmware 15.0.0Kelebek13-33/+72
2022-10-17sdl2_sink: Inline variable init into if conditionlat9nq1-2/+1
Co-authored-by: Mai <mathew1800@gmail.com>
2022-10-16sdl2_sink: Distinguish between capture and non-capture device nameslat9nq1-1/+1
The function prototype appears to care whether we are loading capture devices or not, and SDL_GetAudioDeviceName has a parameter to use it, but for some reason it isn't. This puts `capture` where it goes.
2022-10-16sdl2_sink: Check for null string when loading SDL audio deviceslat9nq1-1/+4
Attempting to place a null string into a vector of strings causes an error that closes the application. Don't.
2022-10-14audio_core: Revert sink name to sdl2Narr the Reg1-2/+2
2022-10-13kernel: remove KWritableEventLiam3-8/+8
2022-10-09Choose the SDL audio backend when Cubeb reports too high of a latencyKelebek16-30/+93
2022-10-04common: remove "yuzu:" prefix from thread namesLiam2-2/+2
2022-09-22Do not try to pause core timing from the audio thread when using single-coreKelebek11-2/+7
2022-09-21audio_renderer: Make GetCommandBuffer() take a u32Lioncash2-2/+2
This function is only ever called with unsigned types, and all of the other interface functions take session_id as a u32, so this makes the class a little more consistent.
2022-09-21audio_manager: Forward declare result typeLioncash2-1/+3
Moves the include into the cpp file to lessen header dependencies.
2022-09-21audio_manager: Remove redundant cast in ThreadFunc()Lioncash1-3/+5
We can just use a local here to get rid of a second cast.
2022-09-21audio_manager: move std::functions in SetOutManager/SetInManagerLioncash1-2/+2
Prevents unnecessary reallocations in the event the captured variables are larger than the internal std::function buffer.
2022-09-21audio_manager: Remove unused forward declarationsLioncash2-10/+0
Allows us to get rid of some unnecessary forward declarations and includes.
2022-09-21audio_manager: Remove unused sessions_started member variableLioncash1-2/+0
This isn't used, so it can be removed.
2022-09-21audio_manager: Remove dependence on system stateLioncash3-10/+4
This isn't used by the class, so this can be removed for the time being.
2022-09-16audio_renderer: Pass command buffer by const referenceLioncash4-4/+4
This is just being copied and isn't modified at all.
2022-09-16sink_stream: Mark GetQueueSize as constLioncash1-1/+1
2022-09-16node_states: Mark relevant member functions as constLioncash1-2/+2
2022-09-16i3dl2/reverb: Mark relevant member functions as constLioncash2-4/+4
These two don't modify member state.
2022-09-16behavior_info: Mark CopyErrorInfo as constLioncash4-6/+6
This doesn't modify member state. We can also mark the parameter of AppendError as const as well, since it isn't modified.
2022-09-16audio_device: Mark GetDeviceVolume as constLioncash2-2/+2
This doesn't modify instance state.
2022-09-16audio_render_manager: Mark several functions as constLioncash2-6/+6
2022-09-16audio_in: Mark several functions as constLioncash4-18/+18
These functions don't modify class state, so we can mark them as such
2022-09-16audio_out: Mark several functions as constLioncash4-16/+17
These don't affect class state, so we can mark them as such.
2022-09-16audio_buffers: Pass by const-ref in AppendBuffersLioncash3-13/+17
This function doesn't modify the passed in buffer, so we can make that explicit.
2022-09-16device_session: Convert for loop into ranged for in AppendBuffersLioncash1-5/+5
Simplifies the indexing code a little bit.
2022-09-16device_session: Pass arguments by const-ref in relevant functionsLioncash3-7/+7
These functions don't modify the passed in audio buffers, so we can signify that in the interface.
2022-09-15audio_core: Amend documentation tagsLioncash28-112/+105
Resolves a wackload of -Wdocumentation warnings due to mismatching tags and whatnot.
2022-09-15audio_device: Mark member functions as const where applicableLioncash2-8/+8
These member functions don't modify any internal state.
2022-09-15audio_device: Make AudioDeviceName constructor constexprLioncash4-15/+29
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
2022-09-13compressor: Simplify memset in InitializeCompressorEffectLioncash1-1/+1
Provides equivalent behavior while being significantly smaller.
2022-09-13compressor: Mark params parameters as constLioncash1-3/+3
These functions don't modify the parameters.
2022-09-13compressor: Remove unneeded casts in ApplyCompressorEffectLioncash1-2/+1
Same behavior, but also silences a -Wcast-qual warning, since the second cast casts away const.
2022-09-13Remove pause callbacks from coretimingKelebek112-120/+29
2022-09-12Remove a pragma once from a cpp fileKelebek11-2/+0
2022-09-04Don't stall with nvdecKelebek13-1/+29
2022-09-02Rework audio output, connecting AudioOut into coretiming to fix desync during heavy loads.Kelebek122-842/+549
2022-08-12Do some log memes to help perceived volumeKelebek11-0/+3
2022-07-30audio_core: fix -Wuninitialized when compiling with ASanLiam1-4/+4
2022-07-28Avoid depop out of boundsKelebek12-2/+2
2022-07-27chore: make yuzu REUSE compliantAndrea Pappacoda1-0/+3
[REUSE] is a specification that aims at making file copyright information consistent, so that it can be both human and machine readable. It basically requires that all files have a header containing copyright and licensing information. When this isn't possible, like when dealing with binary assets, generated files or embedded third-party dependencies, it is permitted to insert copyright information in the `.reuse/dep5` file. Oh, and it also requires that all the licenses used in the project are present in the `LICENSES` folder, that's why the diff is so huge. This can be done automatically with `reuse download --all`. The `reuse` tool also contains a handy subcommand that analyzes the project and tells whether or not the project is (still) compliant, `reuse lint`. Following REUSE has a few advantages over the current approach: - Copyright information is easy to access for users / downstream - Files like `dist/license.md` do not need to exist anymore, as `.reuse/dep5` is used instead - `reuse lint` makes it easy to ensure that copyright information of files like binary assets / images is always accurate and up to date To add copyright information of files that didn't have it I looked up who committed what and when, for each file. As yuzu contributors do not have to sign a CLA or similar I couldn't assume that copyright ownership was of the "yuzu Emulator Project", so I used the name and/or email of the commit author instead. [REUSE]: https://reuse.software Follow-up to 01cf05bc75b1e47beb08937439f3ed9339e7b254
2022-07-22Project AndioKelebek1237-7621/+30231
2022-07-10Rework CoreTimingKelebek12-5/+10
2022-06-27core: Replace all instances of ResultCode with Resultgerman775-15/+14
2022-06-14common: Change semantics of UNREACHABLE to unconditionally crashLiam4-7/+7
2022-06-14audio_core: Remove -Werror=unused-parameterMorph1-1/+0
Removing this as we don't enforce unused parameter warnings elsewhere in the project, and explicitly specify -Wno-unused-parameter in the main CMakeLists.
2022-06-14CMakeLists: Make variable shadowing a compile-time errorMorph1-2/+0
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-05-13command_generator: Use u8 for tap index lutMorph1-8/+8
Using this smaller type saves 1024 bytes in the compiled executable.
2022-04-23general: Convert source file copyright comments over to SPDXMorph43-129/+86
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.
2022-04-01audio_core: remove time stretcherAndrea Pappacoda5-131/+3
Also drop the SoundTouch dependency
2022-02-11audio_core: Update current process revisionlat9nq1-1/+3
Update CURRENT_PROCESS_REVISION from REV9 to REVA. Used by Nintendo Entertainment System - Nintendo Switch Online 6.0.0 and Super Nintendo Entertainment System - Nintendo Switch Online 3.0.0.
2022-01-16audio/stream: Adjust volume scale factorgerman771-2/+2
2021-12-05general: Add missing copyright noticesameerj2-0/+8
2021-10-02common/logging: Move Log::Entry declaration to a separate headerameerj3-0/+7
This reduces the load of requiring to include std::chrono in all files which include log.h
2021-07-08Replace NaN mix volume samples with silence.Kelebek11-0/+9
Fixes Xenoblade Chronicles 2 blowing out the audio.
2021-07-08audio_core: Preserve front channel volume after 6 to 2 downmixKelebek15-75/+81
Many games report 6 channel output while only providing data for 2. We only output 2-channel audio regardless, and in the downmixing, front left/right only provide 36% of their volume. This is done assuming all of the other channels also contain valid data, but in many games they don't. This PR alters the downmixing to preserve front left/right, so volume is not lost. This improves volume in Link's Awakening, New Super Mario Bros U, Disgaea 6, Super Kirby Clash.
2021-07-06Support more PCM formats. Fixes Ys IX audio.Kelebek12-18/+51
2021-07-06CMakeLists: Treat -Wsign-compare as an error on GCC/ClangMorph1-3/+0
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-01Fix XC2/VOEZ crashing, add audio looping and a few misc fixesKelebek16-131/+187
2021-06-28general: Make most settings a BasicSettinglat9nq1-1/+2
Creates a new BasicSettings class in common/settings, and forces setting a default and label for each setting that uses it in common/settings. Moves defaults and labels from both frontends into common settings. Creates a helper function in each frontend to facillitate reading the settings now with the new default and label properties. Settings::Setting is also now a subclass of Settings::BasicSetting. Also adds documentation for both Setting and BasicSetting.
2021-06-27Decouple audio processing and run at variable rateKelebek12-75/+109
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.
2021-06-25audio_core: common: Bump audio revision to 9.bunnei1-1/+1
- This is used in fw 12.x.x games.
2021-06-24Add missing includes (#6521)Chloe1-0/+2
* Add missing includes * Add array
2021-06-22Implement audout GetAudioOutPlayedSampleCountKelebek12-2/+11
Used in Ninja Gaiden games.
2021-06-07Various suggestions by v1993 and lioncashClément Gallet1-10/+6
2021-06-06Add SDL2 audio backendClément Gallet4-0/+211
2021-06-02general: Replace RESULT_SUCCESS with ResultSuccessMorph2-2/+2
Transition to PascalCase for result names.
2021-04-15common: Move settings to common from core.bunnei4-4/+4
- Removes a dependency on core and input_common from common.
2021-02-13revert to std::sin and std::cosChloe Marcec3-6/+6
2021-02-13address issuesChloe Marcec3-22/+25
2021-02-13audren: Implement I3dl2ReverbChloe Marcec8-18/+569
Most notable fix is the voices in Fire Emblem Three Houses
2021-02-02Prevent over scheduling audio events and terminate properly the motion update eventgerman1-1/+8
2021-02-01audren: Disable reverb for the time beingChloe Marcec1-1/+4
As this is causing issues in a few games, it's best to have it disabled until it's completely implemented
2021-01-24audout: FlushAudioOutBuffersChloe Marcec2-0/+11
Fixes Devil May Cry
2021-01-15core: Silence Wclass-memaccess warningsReinUsesLisp1-18/+18
This requires making several types trivial and properly initialize them whenever they are called.
2021-01-15common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINITReinUsesLisp1-3/+3
INSERT_PADDING_BYTES_NOINIT is more descriptive of the underlying behavior.
2020-12-31Make the coding conventions more consistant16-Bit-Dog1-1/+1
lut_index had 0 added when nothing was supposed to be added despite this, index was not added to 0 when nothing was supposed to be added...
2020-12-29hle: service: Acquire and release a lock on requests.bunnei2-15/+6
- This makes it such that we can safely access service members from CoreTiming thread.
2020-12-29audio_core: stream: Ensure buffer is valid before release.bunnei1-2/+10
2020-12-05Update cubeb and request a persistent stream sessionVitor Kiguchi1-0/+1
2020-12-03audio_core: Make shadowing and unused parameters errorsLioncash23-139/+147
Moves the audio code closer to enabling warnings as errors in general.
2020-11-28audio_core: Remove temp_mix_bufferChloe Marcec2-3/+1
It's unused and doesn't need to be initialized
2020-11-17Addressed changesChloe Marcec4-10/+13
2020-11-17audren: Make use of nodiscard, rework downmixing, release all buffersChloe Marcec13-102/+194
Preliminary work for upmixing & general cleanup. Fixes basic issues in games such as Shovel Knight and slightly improves the LEGO games. Upmixing stitll needs to be implemented. Audio levels in a few games will be fixed as we now use the downmix coefficients when possible instead of supplying our own
2020-10-21core: Fix clang build pt.2Lioncash1-2/+5
Resolves the clang build issue in a more unintrusive way.
2020-10-21Revert "core: Fix clang build"bunnei14-215/+169
2020-10-18core: Fix clang buildLioncash14-169/+215
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-10-13audio_core/CMakeLists: Make warnings consistent with coreLioncash6-8/+17
Normalizes the warnings shared between audio_core and core.
2020-09-26command_generator: Make lookup table static constexprLioncash1-2/+3
Allows compilers to elide needing to push these values on the stack every time the function is called.
2020-09-25behavior_info: Fix typo Renerer -> RendererLioncash2-6/+6
2020-09-25cubeb_sink: Use static_cast instead of reinterpret_cast in DataCallback()Lioncash1-2/+2
Conversions from void* to the proper data type are well-defined and supported by static_cast. We don't need to use reinterpret_cast here.
2020-09-25codec: Make lookup table static constexprLioncash2-3/+4
Allows compilers to elide needing to push these values on the stack every time the function is called.
2020-09-25audio_core: Remove unnecessary inclusionsLioncash5-7/+2
Same behavior, but removes header dependencies where they don't need to be.
2020-09-25audio_core: Resolve sign conversion warningsLioncash8-25/+34
While were at it, we can also enable sign conversion warnings and other common warnings as errors to prevent these from creeping back into the codebase.
2020-09-25effect_context: Make use of explicit where applicableLioncash1-13/+12
While we're at it we can make the destructor of the base class virtual to ensure that any polymorphism issues never occur.
2020-09-17audio_core/command_generator: Use const references where applicableLioncash1-10/+11
In a lot of cases, we can make use of const references rather than non-const references. While we're in the area we can silence some truncation and sign conversion warnings.
2020-09-17audio_core/command_generator: Avoid an unnecessary copy in GenerateFinalMixCommand()Lioncash1-1/+1
2020-08-16Preliminary effectsDavid Marcec10-35/+731
2020-08-14Disable biquad filterDavid Marcec1-8/+9
2020-08-14Reworked ADPCM decoder to allow better streamingDavid Marcec2-33/+95
2020-08-13General: Tidy up clang-format warnings part 2Lioncash1-1/+1
2020-08-01mix buffer depoppingDavid Marcec2-30/+101
2020-07-30adpcm streamingDavid Marcec4-27/+32
2020-07-28core_timing: Make use of uintptr_t to represent user_dataLioncash1-3/+4
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
2020-07-25Fix perf regressionDavid Marcec1-1/+2
2020-07-25Fix stream channel count when outputting to stereoDavid Marcec1-1/+1
2020-07-25Address issuesDavid Marcec8-101/+104
2020-07-25Queue extra mix bufferDavid Marcec1-0/+1
2020-07-25Disable time stretcher for time beingDavid Marcec2-6/+4
2020-07-25audio_core: Apollo Part 1, AudioRenderer refactorDavid Marcec25-641/+4127
2020-07-16core_timing: Make TimedCallback take std::chrono::nanosecondsLioncash2-8/+9
Enforces our desired time units directly with a concrete type.
2020-07-16core_timing: Make use of std::chrono with ScheduleEventLioncash2-12/+8
2020-07-10configuration: implement per-game configurations (#4098)lat9nq2-4/+5
* Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
2020-07-01Don't handle cycles late if stretcher is activeDavid Marcec1-1/+3
Timestretcher seems to be broken
2020-07-01audio: Improving audio timing for multicore/single coreDavid Marcec2-20/+7
Fixes the issue with needing the timestretcher for multicore.
2020-06-27Audio: Correct buffer release for host timing.Fernando Sahmkow2-1/+17
2020-06-27AudioCore: Use nanoseconds instead of cycles for buffer time.Fernando Sahmkow2-6/+6
2020-06-26Add a "Mute Audio" hotkeyKewlan1-1/+1
2020-06-13audren: Implement RendererInfoDavid Marcec2-6/+26
Fixes ZLA softlock
2020-05-11fix logic error & scale sample volume based on voice volumeDavid Marcec1-7/+9
2020-05-11pass by const ref insteadDavid Marcec1-8/+7
2020-05-11audio_renderer: Better voice mixing and 6 channel downmixingDavid Marcec3-11/+96
Supersedes #3738 and #3321
2020-04-21audio_renderer: Preliminary BehaviorInfo (#3736)David6-11/+242
* audio_renderer: Preliminary BehaviorInfo * clang format * Fixed IsRevisionSupported * fixed IsValidRevision * Fixed logic error & spelling errors & crash * Addressed issues
2020-04-17core: memory: Move to Core::Memory namespace.bunnei2-10/+11
- helpful to disambiguate Kernel::Memory namespace.
2020-03-23audio_core: Accept Audren REV8FearlessTobi1-1/+1
According to Ryujinx, REV8 only added changes on Performance buffer and Wavebuffer DSP command generation. As we don't support any of those, we can just increment the revision number for now.
2020-03-08cubeb_sink: Don't discard other channels when performing downmixingFearlessTobi1-3/+17
Previously, when performing downmixing, we would discard all channels except the left and right one. This implementation respects them when mixing down to Stereo. It is taken from this document: http://www.atsc.org/wp-content/uploads/2015/03/A52-201212-17.pdf. Fixes Luigis Mansion 3 cutscene and Bayonetta audio.
2020-02-23audio_core: interpolate: Improvements to fix audio crackling.bunnei2-23/+38
- Fixes audio crackling in Crash Team Racing Nitro-Fueled, Super Mario Odyssey, and others. - Addresses followup issues from #3310.
2020-02-22audio_core: interpolate: Fix include for climits (Linux build break).bunnei1-1/+1
2020-01-24audio_core: Switch to a faster interpolation techniqueFearlessTobi2-48/+159
2019-11-27core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory classLioncash1-8/+9
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.
2019-11-27core: Prepare various classes for memory read/write migrationLioncash2-13/+21
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.
2019-11-27core_timing: Use better reference tracking for EventType. (#3159)bunnei2-13/+14
* core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
2019-11-25kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2-4/+3
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details.
2019-09-21Used revision 5 instead of 7, marked constexpr as staticDavid Marcec1-2/+2
2019-09-20Added frame_count for REV7 audio rendererDavid Marcec2-11/+24
Added framecount
2019-07-12Clang formatDavid Marcec2-2/+4
2019-07-12Addressed issuesDavid Marcec2-2/+2
2019-07-12"AudioRenderer" thread should have a unique nameDavid Marcec2-3/+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.
2019-07-08addressed issueDavid Marcec1-1/+1
2019-07-01audren: Only manage wave buffers with a sizeDavid Marcec1-3/+5
We shouldn't be incrementing if wave buffers are empty. They are considered invalid/unused wave buffers. This fixes the issue of certain sounds looping when they shouldn't
2019-06-16Core_Timing: Make core_timing threadsafe by default.Fernando Sahmkow1-1/+1
The old implementation had faulty Threadsafe methods where events could be missing. This implementation unifies unsafe/safe methods and makes core timing thread safe overall.
2019-06-16CleanupDavid Marcec1-1/+1
2019-06-16Impl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEventDavid Marcec2-3/+14
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.
2019-06-05core/core_timing_util: Use std::chrono types for specifying time unitsLioncash1-1/+3
Makes the interface more type-safe and consistent in terms of return values.
2019-03-24core/core_timing: Make callback parameters consistentLioncash1-1/+1
In some cases, our callbacks were using s64 as a parameter, and in other cases, they were using an int, which is inconsistent. To make all callbacks consistent, we can just use an s64 as the type for late cycles, given it gets rid of the need to cast internally. While we're at it, also resolve some signed/unsigned conversions that were occurring related to the callback registration.
2019-03-10audio_core/cubeb_sink: Convert _MSC_VER ifdefs to _WIN32Lioncash2-4/+4
This behavior also needs to be visible for MinGW builds as well.
2019-02-27audio_core/cubeb_sink: Ensure COM is initialized on Windows prior to calling cubeb_initLioncash2-0/+19
cubeb now requires that COM explicitly be initialized on the thread prior to calling cubeb_init.
2019-02-27audio_core/audio_renderer: Name previously unknown parameters of AudioRendererParameterLioncash1-6/+8
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.
2019-02-25audio_core/cubeb_sink: Initialize CubebSinkStream's last_frame data memberLioncash1-1/+1
Ensures that all member variables are initialized in a deterministic manner across the board.
2019-02-25audio_core/cubeb_sink: Add override specifier to destructorLioncash1-1/+1
CubebSinkStream inherits from a base class with a virtual destructor, so override can be appended to CubebSinkStream's destructor.
2019-02-25audio_core/cubeb_sink: Resolve variable shadowing warnings in SamplesInQueueLioncash1-2/+2
The name of the parameter was shadowing the member variable of the same name. Instead, alter the name of the parameter to prevent said shadowing.
2019-02-25audio_core/codec: Resolve truncation warnings within DecodeADPCMLioncash1-2/+2
The assignments here were performing an implicit truncation from int to s16. Make it explicit that this is desired behavior.
2019-02-16audio_core/buffer: Make const and non-const getter for samples consistentLioncash2-2/+2
This way proper const/non-const selection can occur.
2019-02-16core_timing: Convert core timing into a classLioncash6-17/+28
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.
2019-02-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash2-14/+15
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
2019-01-26dsp_interface: fix sound being played while volume is 0fearlessTobi1-1/+1
According to documentation, if the argument of std::exp is zero, one is returned. However we want the return value to be also zero in this case so no audio is played.
2019-01-14audio_core: remove unnecessary spaces on commentsOtávio Pace1-2/+2
2018-12-28audio_core: Convert LOG_CRITICAL + UNREACHABLE over to UNIMPLEMENTED/UNIMPLEMENTED_MSGLioncash3-10/+6
These two macros being used in tandem were used prior to the introduction of UNIMPLEMENTED and UNIMPLEMENTED_MSG. This provides equivalent behavior, just with less typing/reading involved.
2018-12-13audio_core: Make g_sink_details internally linkedLioncash6-32/+55
We can hide the direct array from external view and instead provide functions to retrieve the necessary info. This has the benefit of completely hiding the makeup of the SinkDetails structure from the rest of the code. Given that this makes the array hidden, we can also make the array constexpr by altering the members slightly. This gets rid of several static constructor calls related to std::vector and std::function. Now we don't have heap allocations here that need to occur before the program can even enter main(). It also has the benefit of saving a little bit of heap space, but this doesn't matter too much, since the savings in that regard are pretty tiny.
2018-12-06Avoid (expensive) audio interpolation when sample rates already matchheapo2-4/+8
2018-11-29core: Port all current usages of Event to Readable/WritableEventZach Hilman2-5/+6
2018-11-13audio_core/audio_renderer: Fix typo in AuxInfo member nameLioncash1-1/+1
2018-11-06microprofile: Drop ReleaseActiveBuffer scope.Markus Wick1-4/+0
This was created with the unfinished resampling PR in mind. As the resampling is now on the audio thread, we don't need to care about this here any more.
2018-10-29time_stretch: Switch to values of CitrafearlessTobi1-3/+3
2018-10-27cubeb_sink: ignore null-name device when selectingWeiyi Wang1-1/+2
We already ignore them on listing devices. We should do the same when selecting devices. This fix a crash when opening a specific device while there is a null device in the list
2018-10-24time_stretch: Remove unused m_channel_count member variableLioncash2-3/+1
This is only stored to, but never read from.
2018-10-09EffectOutStatus padding is now in hexDavid Marcec1-1/+1
2018-10-07Fixups for softlockDavid Marcec2-6/+7
2018-10-07Fixed missing returnDavid Marcec1-1/+1
Softlock explanation: after effects are initialized in smo, nothing actually changes the state. It expects the state to always be initialized. With the previous testing, updating the states much like how we handle the memory pools continue to have the softlock(which is why I said it probably wasn't effects) after further examination it seems like effects need to be initialized but the state remains unchanged until further notice. For now, assertions are added for the aux buffers to see if they update, unable to check as I haven't gotten smo to actually update them yet.
2018-10-07Fixed smo softlockDavid Marcec2-13/+120
2018-09-24stream: Preserve enum class type in GetState()Lioncash4-11/+11
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.
2018-09-23Added audren:u#GetAudioRendererStateDavid Marcec4-0/+13
2018-09-21Logging: Change the TimeStretch::Process log from debug to trace level.Subv1-1/+1
This function is called too many times and makes the debug logging basically unusable due to the spam.
2018-09-17time_stretch: Remove unused <array> includeLioncash1-1/+0
This isn't used within this header and isn't necessary.
2018-09-17stream: Replace includes with forward declarations where applicableLioncash2-3/+7
Avoids propagating includes in headers where it's not necessary to do so.
2018-09-17audio_renderer: Replace includes with forward declarations where applicableLioncash2-39/+52
Avoids including unnecessary headers within the audio_renderer.h header, lessening the likelihood of needing to rebuild source files including this header if they ever change. Given std::vector allows forward declaring contained types, we can move VoiceState to the cpp file and hide the implementation entirely.
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi16-64/+67
2018-09-14cubeb_sink: Get rid of variable shadowing within CubebSink's constructorLioncash1-4/+4
The parameter of the lambda was shadowing the variable that was being assigned to.
2018-09-14cubeb_sink: Correct context name in ListCubebSinkDevices()Lioncash1-1/+1
This ain't Citra.
2018-09-14audio_core/time_stretch: Silence truncation warnings in Process()Lioncash1-2/+2
The SoundTouch API only accepts uint amount of samples.
2018-09-12audio_core: Flush stream when not playing anythingMerryMage6-0/+23
2018-09-12audio_core/sink_details: Change std::string parameter into std::string_viewLioncash2-2/+4
The given string is only ever used for lookup and comparison, so we can just utilize a non-owning view to string data here
2018-09-09cubeb_sink: Downsample arbitrary number of channelsMerryMage1-10/+9
2018-09-08cubeb_sink: Perform audio stretchingMerryMage3-24/+26
2018-09-08audio_core: Add audio stretcherMerryMage3-0/+101
2018-09-08cubeb_sink: Hold last available value instead of writing zerosMerryMage1-5/+15
This reduces clicking in output audio should we underrun.
2018-09-08cubeb_sink: Use RingBufferMerryMage1-40/+26
2018-09-08Add audio stretching supportfearlessTobi5-0/+15
2018-09-08audio_renderer: Rename AudioOut instance to audio_outMerryMage2-7/+7
2018-09-04Update microprofile scopes.Markus Wick1-0/+4
Blame the subsystems which deserve the blame :) The updated list is not complete, just the ones I've spotted on random sampling the stack trace.
2018-08-21audio_core/filter: Add explicit cast to assignment in Process()Lioncash1-1/+1
Previously this would cause warnings about implicit conversions to s16 from a double
2018-08-13audio_renderer: samples_remaining counts frames, not samplesMerryMage1-1/+1
2018-08-13audio_core: InterpolateMerryMage5-0/+121
2018-08-13audio_core: Implement low-pass filterMerryMage3-2/+145
2018-08-12cubeb_sink: Protect queue with a mutexMerryMage1-0/+6
2018-08-12Pushed the requested sample rate instead of our fixed sample rateDavid Marcec1-1/+1
2018-08-12Added GetAudioRendererSampleRate, GetAudioRendererSampleCount & GetAudioRendererMixBufferCountDavid Marcec2-1/+16
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
2018-08-07Make building cubeb optionalKAMiKAZOW1-2/+2
2018-08-05audio_core: Implement audren_u audio playback.bunnei3-0/+442
2018-08-05audio_core: Use s16 where possible for audio samples.bunnei8-33/+24
2018-08-05audio_core: Port codec code from Citra for ADPCM decoding.bunnei3-0/+123
2018-08-04cubeb_sink: Support variable sample_rate and num_channels.bunnei1-15/+25
2018-08-04audio_core: Sinks need unique names as well.bunnei5-9/+14
2018-08-04audio_core: Streams need unique names for CoreTiming.bunnei4-9/+13
2018-08-02audio_out: Use Buffer::Tag alias in GetTagsAndReleaseBuffers()'s prototypeLioncash2-2/+2
This makes the Buffer::Tag usage consistent with the Stream class's prototype of GetTagsAndReleaseBuffers().
2018-08-02sink_details: Deduplicate long std::function repetitionLioncash1-4/+6
We can just use type aliases to avoid needing to write the same long type twice
2018-08-02sink_details: std::move std::function instancesLioncash1-1/+2
Given std::function is allowed to potentially allocate, these should be std::move'd to prevent potential reallocation (should that ever happen).
2018-08-01audio_core: Add configuration settings.bunnei2-9/+31
2018-07-31audio_core: Implement Sink and SinkStream interfaces with cubeb.bunnei8-6/+261
2018-07-31audio_core: Add interfaces for Sink and SinkStream.bunnei6-0/+163
2018-07-31audio_core: Misc. improvements to stream/buffer/audio_out.bunnei5-20/+32
2018-07-28audio_core: Add initial code for keeping track of audout state.bunnei6-0/+334
2018-01-13Massive removal of unused modulesJames Rowe26-3017/+0
2018-01-09CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n301-1/+1
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-07audio: Log dropping frames as trace to reduce spam.bunnei1-1/+1
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-1/+1
2017-09-26Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16).Subv5-7/+9
The current code inserts and deletes elements from the beginning of the audio buffer, which is very inefficient in an std::vector. Profiling was done using VisualStudio2017's Performance Analyzer in Super Mario 3D Land. Before this change: AudioInterp::Linear had 14.14% of the runtime (inclusive) and most of that time was spent in std::vector's insert implementation. After this change: AudioInterp::Linear has 0.36% of the runtime (inclusive)
2017-08-28interpolate: Interpolate on a frame-by-frame basisMerryMage3-88/+74
2017-05-28CMake: Add SoundTouch include path to target propertyYuri Kunde Schlesner1-2/+0
2017-05-28CMake: Define an interface target for SDL2 definitionsYuri Kunde Schlesner1-2/+1
2017-05-28CMake: Correct inter-module dependencies and library visibilityYuri Kunde Schlesner1-3/+4
Modules didn't correctly define their dependencies before, which relied on the frontends implicitly including every module for linking to succeed. Also changed every target_link_libraries call to specify visibility of dependencies to avoid leaking definitions to dependents when not necessary.
2017-05-10DSP: Create backing memory for entire DSP RAMYuri Kunde Schlesner4-31/+36
Also move address space mapping out of video_core.
2017-02-27Doxygen: Amend minor issues (#2593)Mat M4-3/+5
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-01-30Support looping HLE audio (#2422)Jake Merdich2-11/+35
* Support looping HLE audio * DSP: Fix dirty bit clears, handle nonmonotonically incrementing IDs * DSP: Add start offset support
2017-01-27fixed the override warningnoah the goodra1-1/+1
``` In file included from citra/src/audio_core/sink_details.cpp:11: citra/src/./audio_core/sdl2_sink.h:25:10: warning: 'SetDevice' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] void SetDevice(int device_id); ^ citra/src/./audio_core/sink.h:39:18: note: overridden virtual function is here virtual void SetDevice(int device_id) = 0; ^ ```
2017-01-26SDL: Select audio device (#2403)Kloen Lansfiel7-18/+69
* Initial Commit Added Device logic to Sinks Started on UI for selecting devices Removed redundant import * Audio Core: Complete Device Switching Complete the device switching implementation by allowing the output device to be loaded, changed and saved through the configurations menu. Worked with the Sink abstraction and tuned the "Device Selection" configuration so that the Device List is automatically populated when the Sink is changed. This hopefully addresses the concerns and recommendations mentioned in the comments of the PR. * Clean original implementation. * Refactor GetSinkDetails
2016-12-13time_stretch: Add missing #pragma once directiveLioncash1-0/+2
2016-12-11Add all services to the Service namespaceLioncash2-3/+3
Previously there was a split where some of the services were in the Service namespace and others were not.
2016-12-10audio_core: SelectSink should default to auto if sink_id is invalidMerryMage1-12/+7
2016-11-22Improve verbosity of audio errors with SDL_GetError()freiro1-2/+2
2016-10-20Fix typosRicardo de Almeida Gonzaga2-4/+4
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner9-9/+9
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot23-48/+10
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner13-76/+110
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot24-249/+323
2016-09-07audio_core: Tweak audio latencyMerryMage2-2/+2
2016-09-03codec: Fix ADPCM distortion caused by incorrect nibble orderfincs1-2/+2
Closes #2049. Signed-off-by: MerryMage <MerryMage@users.noreply.github.com>
2016-08-31audio_core: Add EnableStretching to interface so that one can toggle stretching on and offMerryMage4-9/+52
2016-08-31sink: Change EnqueueSamples to take a pointer to a buffer instead of a std::vectorMerryMage5-9/+9
2016-05-19DSP/HLE: Audio outputMerryMage1-0/+7
2016-05-19DSP/HLE: Implement mixer processingMerryMage5-11/+311
2016-05-15AudioCore: Implement time stretcher (#1737)Maribel4-0/+219
* AudioCore: Implement time stretcher * fixup! AudioCore: Implement time stretcher * fixup! fixup! AudioCore: Implement time stretcher * fixup! fixup! fixup! AudioCore: Implement time stretcher * fixup! fixup! fixup! fixup! AudioCore: Implement time stretcher * fixup! fixup! fixup! fixup! fixup! AudioCore: Implement time stretcher
2016-05-09source: Fix missing logging argumentsLioncash1-2/+2
Silences two warnings on OSX.
2016-05-07fixup simple type conversions where possibleAlexander Laties2-6/+15
2016-05-07AudioCore: SDL2 SinkMerryMage5-1/+175
2016-05-07HLE: Fix recent DSP change for Visual Studio.bunnei1-4/+2
2016-05-03DSP/HLE: Implement Source processingMerryMage7-5/+496
2016-04-30Audio: Add sink selection to configuration filesMerryMage5-4/+55
2016-04-30AudioCore: List of sink typesMerryMage3-0/+46
2016-04-30AudioCore: Implement NullSinkMerryMage2-0/+30
2016-04-29AudioCore: CurrentRegion() -> ReadRegion(), WriteRegion()MerryMage3-26/+31
2016-04-29AudioCore: Implement interpolationMerryMage3-0/+128
2016-04-28Externals: Add soundtouchMerryMage1-1/+4
2016-04-28AudioCore: Move samples_per_frame and num_sources into hle/common.hMerryMage3-12/+11
2016-04-27AudioCore: Hack to prevent regressions: Trigger Binary pipe interrupt every audio frameMerryMage1-0/+2
2016-04-27DSP_DSP: Updated interrupt implementationMerryMage2-4/+7
2016-04-25DSP/Pipe: There are 8 pipesMerryMage2-13/+19
2016-03-28DSP: Implement audio filters (simple, biquad)MerryMage5-7/+275
2016-03-24DSP: Implement audio codecs (PCM8, PCM16, ADPCM)MerryMage3-0/+174
2016-03-06DSP: Implement Pipe 2MerryMage3-34/+194
Pipe 2 is a DSP pipe that is used to initialize both the DSP hardware (the application signals to the DSP to initialize) and the application (the DSP provides the memory location of structures in the shared memory region).
2016-02-21AudioCore: Skeleton ImplementationMerryMage8-0/+766
This commit: * Adds a new subproject, audio_core. * Defines structures that exist in DSP shared memory. * Hooks up various other parts of the emulator into audio core. This sets the foundation for a later HLE DSP implementation.