Commit Graph

73 Commits

Author SHA1 Message Date
MerryMage
0da0dfdcc2 cubeb_sink: Protect queue with a mutex 2018-08-12 20:41:46 +01:00
David Marcec
40dfb71fe8 Pushed the requested sample rate instead of our fixed sample rate 2018-08-12 14:58:36 +10:00
David Marcec
245a22c86f Added GetAudioRendererSampleRate, GetAudioRendererSampleCount & GetAudioRendererMixBufferCount
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-12 14:46:12 +10:00
KAMiKAZOW
0d4fe2f3f5 Make building cubeb optional 2018-08-07 13:21:56 +02:00
bunnei
ff1bd408ba audio_core: Implement audren_u audio playback. 2018-08-04 21:54:30 -04:00
bunnei
6fb1a87184 audio_core: Use s16 where possible for audio samples. 2018-08-04 18:22:58 -04:00
bunnei
d05e09d335 audio_core: Port codec code from Citra for ADPCM decoding. 2018-08-04 18:22:58 -04:00
bunnei
b89c6fa919 cubeb_sink: Support variable sample_rate and num_channels. 2018-08-04 15:30:10 -04:00
bunnei
9930bddc07 audio_core: Sinks need unique names as well. 2018-08-04 14:34:12 -04:00
bunnei
0bb7530a1b audio_core: Streams need unique names for CoreTiming. 2018-08-04 14:34:12 -04:00
bunnei
87636f3323 Merge pull request #895 from lioncash/sink
sink_details: std::move std::function instances
2018-08-03 11:00:56 -04:00
Lioncash
87f82fc5c4 audio_out: Use Buffer::Tag alias in GetTagsAndReleaseBuffers()'s prototype
This makes the Buffer::Tag usage consistent with the Stream class's
prototype of GetTagsAndReleaseBuffers().
2018-08-02 05:18:32 -04:00
Lioncash
9788ab77bb sink_details: Deduplicate long std::function repetition
We can just use type aliases to avoid needing to write the same long
type twice
2018-08-01 23:56:02 -04:00
Lioncash
77cd4a96e8 sink_details: std::move std::function instances
Given std::function is allowed to potentially allocate, these should be
std::move'd to prevent potential reallocation (should that ever happen).
2018-08-01 23:50:48 -04:00
bunnei
833afdeba3 audio_core: Add configuration settings. 2018-07-31 22:38:42 -04:00
bunnei
c930420928 audio_core: Implement Sink and SinkStream interfaces with cubeb. 2018-07-30 21:45:24 -04:00
bunnei
d5541a8258 audio_core: Add interfaces for Sink and SinkStream. 2018-07-30 21:45:24 -04:00
bunnei
e27177a852 audio_core: Misc. improvements to stream/buffer/audio_out. 2018-07-30 18:58:40 -04:00
bunnei
aa39d5f878 audio_core: Add initial code for keeping track of audout state. 2018-07-27 22:33:31 -04:00
James Rowe
8f0a03a606 Massive removal of unused modules 2018-01-12 19:11:03 -07:00
B3n30
51a9a51632 CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-08 19:10:25 -05:00
bunnei
93acb023d6 audio: Log dropping frames as trace to reduce spam. 2018-01-07 16:52:59 -05:00
Huw Pascoe
40a7357877 Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
Subv
c6328af8ae Audio: Use std::deque instead of std::vector for the audio buffer type (StereoBuffer16).
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-09-25 18:31:37 -05:00
MerryMage
de4bbeea54 interpolate: Interpolate on a frame-by-frame basis 2017-08-28 10:54:41 +01:00
Yuri Kunde Schlesner
03574d12b5 CMake: Add SoundTouch include path to target property 2017-05-27 22:09:28 -07:00
Yuri Kunde Schlesner
bd753b8131 CMake: Define an interface target for SDL2 definitions 2017-05-27 21:38:49 -07:00
Yuri Kunde Schlesner
4a5d297fe7 CMake: Correct inter-module dependencies and library visibility
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-27 18:41:24 -07:00
Yuri Kunde Schlesner
c47c3096fc DSP: Create backing memory for entire DSP RAM
Also move address space mapping out of video_core.
2017-05-09 21:44:00 -07:00
Mat M
43cabebf82 Doxygen: Amend minor issues (#2593)
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-02-26 17:58:51 -08:00
Jake Merdich
1b42514941 Support looping HLE audio (#2422)
* Support looping HLE audio
* DSP: Fix dirty bit clears, handle nonmonotonically incrementing IDs
* DSP: Add start offset support
2017-01-29 23:52:25 -08:00
noah the goodra
306e198adf fixed the override warning
```
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-27 14:24:14 -06:00
Kloen Lansfiel
ff31276d53 SDL: Select audio device (#2403)
* 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
2017-01-25 22:33:26 -05:00
Lioncash
a6faa70f12 time_stretch: Add missing #pragma once directive 2016-12-12 19:16:46 -05:00
Lioncash
b01bc59735 Add all services to the Service namespace
Previously there was a split where some of the services were in the
Service namespace and others were not.
2016-12-11 00:07:27 +00:00
MerryMage
a9a94d7b43 audio_core: SelectSink should default to auto if sink_id is invalid 2016-12-10 01:26:22 +00:00
freiro
5541fbfd4c Improve verbosity of audio errors with SDL_GetError() 2016-11-22 17:28:11 +01:00
Ricardo de Almeida Gonzaga
5331d83994 Fix typos 2016-10-20 12:26:59 -02:00
Yuri Kunde Schlesner
45751915a0 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
e4393f7ff2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
0e23caf9fd Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
7e8d205414 Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
MerryMage
ebff1f5feb audio_core: Tweak audio latency 2016-09-07 15:27:32 +01:00
fincs
94b163640e codec: Fix ADPCM distortion caused by incorrect nibble order
Closes #2049.

Signed-off-by: MerryMage <MerryMage@users.noreply.github.com>
2016-09-03 14:06:25 +01:00
MerryMage
9ce70bf424 audio_core: Add EnableStretching to interface so that one can toggle stretching on and off 2016-08-31 16:56:30 +01:00
MerryMage
ee2dd5edad sink: Change EnqueueSamples to take a pointer to a buffer instead of a std::vector 2016-08-31 16:55:10 +01:00
MerryMage
20492886f1 DSP/HLE: Audio output 2016-05-19 07:25:26 +01:00
MerryMage
04ce0ebe0f DSP/HLE: Implement mixer processing 2016-05-19 07:24:39 +01:00
Maribel
f2ddd0b025 AudioCore: Implement time stretcher (#1737)
* 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-14 22:04:03 -04:00
Lioncash
0dff30a742 source: Fix missing logging arguments
Silences two warnings on OSX.
2016-05-09 09:41:03 -04:00