Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
315 commits
Select commit Hold shift + click to select a range
6e219e1
Some slight fixes
JesseTG Jan 12, 2023
0581ec9
Update libretro.h
JesseTG Jan 12, 2023
18cc94e
Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE
JesseTG Jan 12, 2023
a8fca5a
Finish proof-of-concept for mic support
JesseTG Jan 13, 2023
2a60a96
Merge remote-tracking branch 'upstream/master' into jtg/microphone-su…
JesseTG Jan 13, 2023
fb4f3c0
Add macros that aren't available in SDL 2
JesseTG Jan 13, 2023
7ad85d8
Comment out a variable definition for now
JesseTG Jan 13, 2023
abb968d
Add some comments for clarity
JesseTG Jan 13, 2023
8096acd
Let ALSA tolerate a null new_rate
JesseTG Jan 13, 2023
0097b80
Partial ALSA microphone support
JesseTG Jan 13, 2023
722243d
Install error logging in the ALSA driver
JesseTG Jan 13, 2023
d1cc869
Free the ALSA microphone in alsa_free
JesseTG Jan 13, 2023
e6712fd
Fix an indent
JesseTG Jan 13, 2023
b864aab
First draft of alsa_read_microphone
JesseTG Jan 13, 2023
a16a892
Deinitialize SDL Audio in sdl_audio_free
JesseTG Jan 13, 2023
5d00726
Save and restore the ALSA error logger
JesseTG Jan 14, 2023
3fb8304
Add newlines to some RARCH_ERRs
JesseTG Jan 14, 2023
9034eb1
Add some logging
JesseTG Jan 14, 2023
716ec00
Check for the mic being active via settings instead of via flags
JesseTG Jan 14, 2023
4476a77
Adjusted a log entry to be less misleading
JesseTG Jan 15, 2023
6272b99
Fix an incorrect format string
JesseTG Jan 15, 2023
c63fd75
Tidy up logging in alsa.c
JesseTG Jan 15, 2023
f1f19cc
Rename audio_enable_microphone to audio_enable_input
JesseTG Jan 15, 2023
3a4d7bf
Rename microphone_device to audio_input_device
JesseTG Jan 15, 2023
4b2bfd5
Add audio_input_latency and audio_input_block_frames settings
JesseTG Jan 15, 2023
41e850b
Add all mic-related settings to the options menu
JesseTG Jan 15, 2023
68254a9
Adjust logging for alsa.c
JesseTG Jan 15, 2023
a5d1cf7
Refer to the microphone in logs by name
JesseTG Jan 15, 2023
7042eff
Use %u instead of %d for some log items
JesseTG Jan 16, 2023
811cb14
Add input_samples_buf
JesseTG Jan 16, 2023
77f5330
Remove an inaccurate comment
JesseTG Jan 16, 2023
560eddf
Change type of input_samples_buf
JesseTG Jan 16, 2023
1157709
Clean up audio_driver_flush_microphone_input
JesseTG Jan 16, 2023
2589ddd
Comment convert_float_to_s16
JesseTG Jan 16, 2023
13e3be7
Don't use the resampler for mic input
JesseTG Jan 16, 2023
5f7565f
Fix crash in the ALSA driver when reading from a mic
JesseTG Jan 16, 2023
4e05fbd
Update some logging messages
JesseTG Jan 16, 2023
2b337d0
ALSA support now works for mics
JesseTG Jan 16, 2023
67b7603
Reuse some common functions in alsa.c
JesseTG Jan 17, 2023
c5cc594
Add alsa_thread_microphone_t
JesseTG Jan 17, 2023
a938587
Refactor alsa.c
JesseTG Jan 17, 2023
269f3d6
Make ALSA logging a little more consistent
JesseTG Jan 17, 2023
500d412
Clean up the mic with alsa_free_microphone if alsa_init_microphone fails
JesseTG Jan 17, 2023
49e1722
Remove an unused function
JesseTG Jan 17, 2023
fd7670e
Move some cleanup in alsa.c to a common function
JesseTG Jan 17, 2023
111d3c1
First crack at mic support for alsathread
JesseTG Jan 17, 2023
f2a421c
Slight cleanups for clarity
JesseTG Jan 17, 2023
40b9080
Implement alsa_thread_set/get_microphone_state
JesseTG Jan 17, 2023
c3d9bc4
More work on alsathread
JesseTG Jan 17, 2023
643e7c7
Slight cleanups for clarity
JesseTG Jan 18, 2023
907dc8d
Add alsa_set_mic_enabled_internal
JesseTG Jan 18, 2023
01cec0f
Use alsa_set_mic_enabled_internal
JesseTG Jan 18, 2023
94a0dc3
Log a little more info
JesseTG Jan 18, 2023
533833f
Log when the audio driver is started/stopped
JesseTG Jan 18, 2023
e123ecb
Move base microphone driver code into a new directory
JesseTG Jan 23, 2023
84ff6d9
Initialize and deinitialize the microphone driver
JesseTG Jan 24, 2023
d8e4b74
Implement sdl_microphone.c
JesseTG Jan 24, 2023
52aa83b
Un-const an argument
JesseTG Jan 24, 2023
b8b17fb
Revise comments for microphone_driver.h
JesseTG Jan 24, 2023
590d298
Remove an unimplemented function
JesseTG Jan 24, 2023
48f688d
Remove some functions from the mic driver
JesseTG Jan 24, 2023
d045ab0
Remove mic functions from audio_thread_wrapper
JesseTG Jan 24, 2023
acdc5a7
Remove mic functions from sdl_audio
JesseTG Jan 24, 2023
5b45a87
Fix microphone_null
JesseTG Jan 24, 2023
ee18df1
Split the mic code for the alsa audio drivers into microphone drivers
JesseTG Jan 25, 2023
282e64d
Fix an extra struct member
JesseTG Jan 25, 2023
5c05467
Add a setting for the mic driver
JesseTG Jan 25, 2023
9d4297c
Add a command to reinitialize the microphone driver
JesseTG Jan 25, 2023
4e997de
Rename mic-related settings
JesseTG Jan 25, 2023
a1efbf0
Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL
JesseTG Jan 25, 2023
3b3968c
Rename audio_enable_input to microphone_enable
JesseTG Jan 25, 2023
e1c0741
Remove some labels from qt_options
JesseTG Jan 25, 2023
f227853
Search for microphone_driver within find_driver_nonempty
JesseTG Jan 25, 2023
1a7a5ce
Clean up some mic driver code
JesseTG Jan 25, 2023
425cb87
Pending mics now return silence
JesseTG Jan 25, 2023
2fc37cd
Adjust some logging and comments
JesseTG Jan 25, 2023
9f25c32
Some cleanup in the microphone driver
JesseTG Jan 25, 2023
f1fe24c
Invert a flag check
JesseTG Jan 25, 2023
c184506
Fix a log message
JesseTG Jan 25, 2023
764f65c
Fix the wrong flags being checked
JesseTG Jan 25, 2023
cb02d37
Slight refactor of wasapi_init_device
JesseTG Jan 26, 2023
d9e8a46
Add some WASAPI macros for _IAudioCaptureClient
JesseTG Jan 26, 2023
6cc352e
Move some common WASAPI functions to audio/common/wasapi.c
JesseTG Jan 26, 2023
04e25dc
Add wasapi_log_hr
JesseTG Jan 26, 2023
e187d9f
Generalize mmdevice_list_new to look for capture devices, too
JesseTG Jan 26, 2023
1efc0b9
Fix a function declaration
JesseTG Jan 26, 2023
f9c2218
Move driver-specific device_list_new functions into their respective …
JesseTG Jan 26, 2023
7ab6f8e
Clean up some declarations
JesseTG Jan 26, 2023
c7890f3
First draft of wasapi microphone driver
JesseTG Jan 26, 2023
aebdf2d
Add wasapi_microphone_device_list_free
JesseTG Jan 26, 2023
fefb2b1
Change function parameter names to be consistent with microphone_driver
JesseTG Jan 26, 2023
2437221
Partially implement wasapi_microphone_read
JesseTG Jan 26, 2023
147babe
Refactor the mic driver's functions
JesseTG Jan 27, 2023
30294cf
Edit some WASAPI functions for logging and clarity
JesseTG Jan 27, 2023
0788f56
Implement more of the WASAPI mic driver
JesseTG Jan 27, 2023
d183eb1
Rename write_event to read_event
JesseTG Jan 27, 2023
dedc6cd
Pass the WASAPI driver context to the various read functions
JesseTG Jan 27, 2023
ef221be
Mostly implement the read function for the WASAPI mic driver
JesseTG Jan 28, 2023
39f5ad5
Fix a crash in microphone_driver
JesseTG Jan 28, 2023
6d8cfde
Reduce some logging in wasapi common functions
JesseTG Jan 29, 2023
e9da792
Add some macro wrappers for IAudioClient methods
JesseTG Jan 30, 2023
50439e3
Update mic driver configuration
JesseTG Jan 30, 2023
26f2d4a
Fix a menu entry scrolling through audio devices instead of mic devices
JesseTG Jan 30, 2023
da855f3
Add some utility functions
JesseTG Jan 30, 2023
35b1e1d
Expose the new utility functions in wasapi.h
JesseTG Jan 30, 2023
74a2e9c
Add extra logging in the WASAPI common functions
JesseTG Jan 30, 2023
7c64183
Add sharemode_name
JesseTG Jan 30, 2023
cc2c91f
Use _IAudioClient_Initialize macro in some places
JesseTG Jan 30, 2023
86b6fcf
Pass channels to wasapi_init_client
JesseTG Jan 30, 2023
d28e9d3
Use _IAudioClient_Initialize macro some more
JesseTG Jan 30, 2023
ed8d53d
Forgot to pass channels in some places
JesseTG Jan 30, 2023
f353395
Add some utility functions
JesseTG Jan 31, 2023
2432fa5
Forgot an #include
JesseTG Jan 31, 2023
06d6310
Add wasapi_select_device_format
JesseTG Jan 31, 2023
1a04344
Simplify the format selection logic in wasapi_init_client_sh
JesseTG Jan 31, 2023
e11b5fc
Unset the microphone in wasapi_microphone_close_mic
JesseTG Jan 31, 2023
9303cf1
Simplify some logging
JesseTG Jan 31, 2023
7e82956
Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer
JesseTG Jan 31, 2023
945d2b3
Remove some unneeded logging
JesseTG Jan 31, 2023
c0cb9f2
Add some values to hresult_name
JesseTG Jan 31, 2023
01ab254
Polish up wasapi_select_device_format
JesseTG Jan 31, 2023
3cd1057
Compute the fields of WAVEFORMATEXTENSIBLE correctly
JesseTG Jan 31, 2023
a0bc2d2
Simplify logic for WASAPI client creation
JesseTG Jan 31, 2023
4301380
Fix a potential hang in wasapi_microphone_read_shared_buffered
JesseTG Jan 31, 2023
e5ed6e6
Stop the microphone if the driver is stopped
JesseTG Jan 31, 2023
b4b39e4
Don't name the microphone event
JesseTG Jan 31, 2023
eb77f76
Ensure that wasapi_init_client reports the correct format and rate
JesseTG Jan 31, 2023
77f42fa
Implement exclusive microphone read access for WASAPI
JesseTG Jan 31, 2023
a5ac217
Add _IAudioCaptureClient_GetNextPacketSize macro
JesseTG Feb 4, 2023
0d2f5e8
Organize cases in hresult_name
JesseTG Feb 4, 2023
bb6c132
Clear some extra fields if wasapi_set_format is setting a Pcm format
JesseTG Feb 4, 2023
785de1b
Adjust some logs
JesseTG Feb 4, 2023
1e0d0ed
Adjust some logs
JesseTG Feb 4, 2023
c198160
Remove unneeded local vars
JesseTG Feb 5, 2023
53a3a73
Add a log
JesseTG Feb 5, 2023
fbc29b5
Update wasapi.c
JesseTG Feb 5, 2023
4983348
Update wasapi.c
JesseTG Feb 5, 2023
5a07644
Fix shared-mode mic support in WASAPI producing broken input
JesseTG Feb 5, 2023
60cd9d1
Reuse a common function
JesseTG Feb 5, 2023
a453007
Remove some code I was using for test purposes
JesseTG Feb 5, 2023
70a8c89
Clarify some language
JesseTG Feb 5, 2023
311f804
Double the default shared-mode mic buffer length
JesseTG Feb 5, 2023
74e8ee6
Split getting a device's name into a separate function, then use it
JesseTG Feb 5, 2023
589c5f5
Fix the ALSA mic drivers
JesseTG Feb 5, 2023
81c860a
Remove unused synchronization primitives from the SDL microphone driver
JesseTG Feb 5, 2023
ff094ab
Add sdl_microphone_mic_use_float
JesseTG Feb 5, 2023
d376a99
Document audio_driver_state_flags
JesseTG Feb 6, 2023
b36e1b3
Remove an unused function in wasapi.c
JesseTG Feb 8, 2023
1487969
Add and document flags in microphone_driver.h
JesseTG Feb 8, 2023
d2538d0
Remove driver-specific mic start/stop functions
JesseTG Feb 8, 2023
1676214
Remove some unused fields in microphone_driver.h
JesseTG Feb 8, 2023
d89767d
Add CMD_EVENT_MICROPHONE_STOP/START
JesseTG Feb 8, 2023
e8d09bd
Remove unused functions from microphone_null
JesseTG Feb 8, 2023
b209103
Change how the mic driver state is referenced in some places
JesseTG Feb 8, 2023
af51baa
Simplify the SDL microphone driver
JesseTG Feb 8, 2023
7d9e5eb
Simplify the WASAPI microphone driver
JesseTG Feb 8, 2023
8a77d89
Make microphone_wasapi_sh_buffer_length a uint, not an int
JesseTG Feb 8, 2023
6875c95
Make the microphone frontend more robust
JesseTG Feb 8, 2023
980ba3e
Stop the mic driver in core_unload_game
JesseTG Feb 8, 2023
2a91659
Merge remote-tracking branch 'upstream/master' into jtg/microphone-su…
JesseTG Feb 8, 2023
20210c1
Ensure mic support is compatible with the revised menu code
JesseTG Feb 8, 2023
9afa9c6
Move alsa.h into audio/common
JesseTG Feb 8, 2023
d74c122
Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED
JesseTG Feb 9, 2023
4f0ca8d
Refactor the ALSA microphone driver
JesseTG Feb 9, 2023
c3ddae9
Move some common alsathread code into audio/common/alsathread.c
JesseTG Feb 9, 2023
2d2e6ea
Change return type of mic_driver_open_mic_internal to bool
JesseTG Feb 10, 2023
040d0f5
First crack at resampling mic input
JesseTG Feb 10, 2023
1f31eee
Remove an extraneous check
JesseTG Feb 10, 2023
05a51dd
Add stereo/mono conversion functions
JesseTG Feb 10, 2023
955f839
Make alsa_start_pcm and alsa_stop_pcm more robust
JesseTG Feb 10, 2023
82f8ad0
Revise some mic-related comments in libretro.h
JesseTG Feb 10, 2023
2ce0b20
First crack at resampling mic input
JesseTG Feb 10, 2023
9740007
Simplify an expression
JesseTG Feb 10, 2023
38b54b0
Simplify an expression
JesseTG Feb 10, 2023
40b8260
Fix a log tag
JesseTG Feb 10, 2023
932771e
Allow mic resampler to be configured separately from audio resampler
JesseTG Feb 13, 2023
8f2c121
Add some comments
JesseTG Feb 13, 2023
b17c9a2
Set the source ratio to something sensible
JesseTG Feb 13, 2023
8222e91
Merge remote-tracking branch 'upstream/master' into jtg/microphone-su…
JesseTG Feb 13, 2023
4f71f46
Stop deadlock in `alsathread` mic driver
JesseTG Feb 13, 2023
3c107c5
Allow mics to be initialized even when core is loaded from CLI
JesseTG Feb 15, 2023
ca52772
Rename the functions in retro_microphone_interface
JesseTG Feb 15, 2023
08dfef5
Revise some mic-related comments in libretro.h
JesseTG Feb 15, 2023
7f178e6
Update retro_microphone_interface
JesseTG Feb 16, 2023
eb0fdb4
Use parameter objects in the microphone handle
JesseTG Feb 16, 2023
c7312e5
Replace get_mic_rate with get_params
JesseTG Feb 16, 2023
f6af75f
Add a microphone interface version
JesseTG Feb 16, 2023
b2ed9b6
Remove part of a comment
JesseTG Feb 16, 2023
1e1ddbc
Set the effective params in mic_driver_microphone_handle_init
JesseTG Feb 16, 2023
4be4aed
Drop a stray newline
JesseTG Feb 16, 2023
f3ea875
Change where the mic interface is zeroed
JesseTG Feb 16, 2023
bbc1545
Reduce logspam for wasapi_set_nonblock_state
JesseTG Feb 16, 2023
2499873
Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0
JesseTG Feb 16, 2023
466926d
Set the new_rate in wasapi_init
JesseTG Feb 16, 2023
bae18a9
Change description of microphone sample rate in the settings
JesseTG Feb 17, 2023
f05ae62
First attempt at resampling configured mic input
JesseTG Feb 17, 2023
b29688a
Forgot a section
JesseTG Feb 17, 2023
e994e91
Fix some input samples being skipped
JesseTG Feb 17, 2023
9b629fb
Rename a variable for clarity
JesseTG Feb 17, 2023
7392bae
Add microphone.outgoing_samples
JesseTG Feb 17, 2023
cdf1afd
Update the mic driver
JesseTG Feb 17, 2023
a7e0736
Remove part of a comment
JesseTG Feb 17, 2023
eba402f
Update some comments in audio_resampler.h
JesseTG Feb 20, 2023
78116ac
Slightly refactor the SDL microphone driver
JesseTG Feb 20, 2023
99d95e8
Merge remote-tracking branch 'upstream/master' into jtg/microphone-su…
JesseTG Feb 20, 2023
e666767
Fix a non-C89-compliant declaration
JesseTG Feb 20, 2023
eac9066
Add new files to griffin.c
JesseTG Feb 20, 2023
cd449c1
Remove a C++-style comment
JesseTG Feb 20, 2023
947a79f
Add two more files to griffin.c
JesseTG Feb 20, 2023
aab35e8
Remove some unneeded declarations in microphone_driver.h
JesseTG Feb 20, 2023
c5bddb6
Remove a stray comma in configuration.c
JesseTG Feb 20, 2023
c3247c8
Fix compilation on some platforms
JesseTG Feb 20, 2023
6035134
Change some function signatures
JesseTG Feb 21, 2023
618f216
Make the ALSA drivers always set the audio rate
JesseTG Feb 21, 2023
aa15591
Fix the alsathread mic driver
JesseTG Feb 21, 2023
5052695
Make state_manager_frame_is_reversed return false if HAVE_REWIND isn'…
JesseTG Feb 21, 2023
1480688
Mute the microphone if the core is running in fast-forward, slow-mo, …
JesseTG Feb 21, 2023
3e1941d
Clarify a comment
JesseTG Feb 21, 2023
f77e39c
Clarify a comment
JesseTG Feb 21, 2023
fdb6719
Add a comment
JesseTG Feb 21, 2023
fae6499
Don't allocate memory for slowmo samples in the mic driver
JesseTG Feb 21, 2023
e917c9f
Fix a {
JesseTG Feb 21, 2023
a2553eb
Add my name to AUTHORS.h
JesseTG Feb 21, 2023
9a8aa28
Add driver_lifetime_flags
JesseTG Feb 21, 2023
0497162
Ensure that resetting the mic driver maintains active mic handles
JesseTG Feb 21, 2023
d026746
Update CHANGES.md
JesseTG Feb 21, 2023
ffda8cc
Move some default microphone settings to a new part of the config file
JesseTG Feb 22, 2023
aec5f65
Ensure that RetroArch can use the audio format that Windows suggests
JesseTG Feb 22, 2023
82608e0
Remove references to mic support in the SDL audio driver
JesseTG Feb 22, 2023
568f2dd
Remove unused WASAPI functions
JesseTG Feb 22, 2023
328e5fb
Return failure if RetroArch couldn't select a WASAPI format
JesseTG Feb 22, 2023
096f05e
Ensure that Windows uses the WASAPI mic driver by default
JesseTG Feb 22, 2023
09d4748
Treat disabled mic support as a warning, not an error
JesseTG Feb 22, 2023
b771f01
Clarify some WASAPI-related microphone settings
JesseTG Feb 22, 2023
47d12bc
Remove some unused variables
JesseTG Feb 22, 2023
35623bb
Add or revise microphone-related comments
JesseTG Feb 22, 2023
9ae957c
Rearrange doc comments for microphone types in libretro.h
JesseTG Feb 22, 2023
d335834
Remove a space
JesseTG Feb 22, 2023
71f8823
Remove some unused flags
JesseTG Feb 22, 2023
d01ca8c
Remove ALSA error logger
JesseTG Feb 22, 2023
efcbaee
Remove unneeded microphone-related arguments
JesseTG Feb 22, 2023
7806cc2
Document a parameter
JesseTG Feb 22, 2023
5a34011
Remove a logging call
JesseTG Feb 24, 2023
1fa5a3d
Merge latest changes from upstream
JesseTG Jun 2, 2023
b1cec80
Add a constant for the microphone's shared buffer length for WASAPI
JesseTG Jun 2, 2023
0585b6e
Fix stylistic inconsistencies
JesseTG Jun 5, 2023
6f9645b
Make mic_driver_get_sample_size a macro instead of a function
JesseTG Jun 5, 2023
b2b6f41
Move the microphone implementation to the audio directory
JesseTG Jun 5, 2023
2c3e7d3
Make microphone support optional (but enabled by default)
JesseTG Jun 5, 2023
b4a59b5
Fix the griffin build
JesseTG Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.h
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Jean-Sébastien Guay (Skylark13)
Jeff (jeffbdavenport)
Jeff Sousa (LordeIlluminati)
jess (winneon)
Jesse Talavera-Greenberg (JesseTG)
Joan Coll Cerdán (johanbcn)
Job Adrian Salinas Gonzalez (efylan)
Joe Osborn (JoeOsborn)
Expand Down
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Future
- LIBRETRO/MICROPHONE: Add new API for microphone support.
- MICROPHONE: Add support for microphones.
- MICROPHONE/ALSA: Add `alsa` and `alsathread` microphone drivers.
- MICROPHONE/SDL: Add `sdl2` microphone driver.
- MICROPHONE/WASAPI: Add `wasapi` microphone driver.

# 1.15.0
- AI SERVICE: Fix NVDA switching to Powershell on speak
Expand Down Expand Up @@ -116,8 +121,9 @@ as well. Without this, sound files can not be opened from file browser with core
- MENU/CHEATS: Fixed label capitalization in cheats (Add New After/Before This)
- MENU/SOUNDS: Add scrolling sounds for RGUI, XMB, MaterialUI and Ozone.
- MENU/SOUNDS: Better scrolling sound implementation, add new 'notice back' sound
- MENU/SOUNDS: Scroll sound fixes. Correctly get list size in xmb.c for playing scrolling sound when switching categories, play the scrolling sound when pressing cancel in ozone, play the sound when scrolling with ZL and ZR, play the correct sound when scrolling with L- MIYOO: L3/R3 support for Dingux Gamepad controller device.
- MENU/SOUNDS: Scroll sound fixes. Correctly get list size in xmb.c for playing scrolling sound when switching categories, play the scrolling sound when pressing cancel in ozone, play the sound when scrolling with ZL and ZR, play the correct sound when scrolling with L
- MENU/WIDGETS: Show square sized widget on volume mute. Volume widget is currently fixed size always, and thus showing a lot of empty space when muting, therefore shorten the box to icon size only when muting.
- MIYOO: L3/R3 support for Dingux Gamepad controller device.
- NETWORKING: Call ssl_socket_close for SSL sockets
- NETWORKING/CHEEVOS: net_http - Temporary fix for cheevos crash. Don't use new timeout/poll code for cheevos HTTP requests.
- NETWORKING/MENU: Network information cleanup:
Expand Down
35 changes: 31 additions & 4 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ OBJ += \
cores/dynamic_dummy.o \
$(LIBRETRO_COMM_DIR)/queues/message_queue.o

ifeq ($(HAVE_MICROPHONE), 1)
DEFINES += -DHAVE_MICROPHONE
OBJ += audio/microphone_driver.o
endif

ifeq ($(HAVE_REWIND), 1)
DEFINES += -DHAVE_REWIND
OBJ += state_manager.o
Expand Down Expand Up @@ -820,7 +825,12 @@ endif
endif

ifeq ($(HAVE_ALSA), 1)
OBJ += audio/drivers/alsa.o
OBJ += audio/drivers/alsa.o \
audio/common/alsa.o

ifeq ($(HAVE_MICROPHONE), 1)
OBJ += audio/drivers_microphone/alsa.o
endif

ifneq ($(HAVE_HAKCHI), 1)
ifneq ($(HAVE_SEGAM), 1)
Expand All @@ -832,7 +842,12 @@ ifeq ($(HAVE_ALSA), 1)

ifneq ($(MIYOO), 1)
ifeq ($(HAVE_THREADS), 1)
OBJ += audio/drivers/alsathread.o
OBJ += audio/drivers/alsathread.o \
audio/common/alsathread.o

ifeq ($(HAVE_MICROPHONE), 1)
OBJ += audio/drivers_microphone/alsathread.o
endif
endif
endif

Expand Down Expand Up @@ -895,9 +910,14 @@ endif

ifeq ($(HAVE_WASAPI), 1)
HAVE_MMDEVAPI = 1
OBJ += audio/drivers/wasapi.o
OBJ += audio/drivers/wasapi.o \
audio/common/wasapi.o
DEFINES += -DHAVE_WASAPI
LIBS += -lole32 -lksuser

ifeq ($(HAVE_MICROPHONE), 1)
OBJ += audio/drivers_microphone/wasapi.o
endif
endif

ifeq ($(HAVE_XAUDIO), 1)
Expand Down Expand Up @@ -928,7 +948,9 @@ ifeq ($(HAVE_NEON),1)
endif

OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o \
$(LIBRETRO_COMM_DIR)/audio/conversion/mono_to_stereo_float.o \
$(LIBRETRO_COMM_DIR)/audio/conversion/stereo_to_mono_float.o \

ifeq ($(HAVE_RWAV), 1)
DEFINES += -DHAVE_RWAV
Expand Down Expand Up @@ -1540,6 +1562,11 @@ ifeq ($(HAVE_SDL2), 1)
gfx/common/sdl2_common.o
DEF_FLAGS += $(SDL2_CFLAGS)
LIBS += $(SDL2_LIBS)

ifeq ($(HAVE_MICROPHONE), 1)
OBJ += audio/drivers_microphone/sdl_microphone.o
# Microphones are not supported by SDL 1.x
endif
else ifeq ($(HAVE_SDL), 1)
HAVE_SDL_COMMON = 1
OBJ += gfx/drivers/sdl_gfx.o
Expand Down
72 changes: 71 additions & 1 deletion audio/audio_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,87 @@ enum audio_mixer_state
AUDIO_STREAM_STATE_PLAYING_SEQUENTIAL
};

/**
* Bit flags that describe the current state of the audio driver.
*/
enum audio_driver_state_flags
{
/**
* Indicates that the driver was successfully created
* and is currently valid.
* You may submit samples for output at any time.
*
* This flag does \em not mean that the player will hear anything;
* the driver might be suspended.
*
* @see AUDIO_FLAG_SUSPENDED
*/
AUDIO_FLAG_ACTIVE = (1 << 0),

/**
* Indicates that the audio driver outputs floating-point samples,
* as opposed to integer samples.
*
* All audio is sent through the resampler,
* which operates on floating-point samples.
*
* If this flag is set, then the resampled output doesn't need
* to be converted back to \c int16_t format.
*
* This won't affect the audio that the core writes;
* either way, it's supposed to output \c int16_t samples.
*
* This flag won't be set if the selected audio driver
* doesn't support (or is configured to not use) \c float samples.
*
* @see audio_driver_t::use_float
*/
AUDIO_FLAG_USE_FLOAT = (1 << 1),

/**
* Indicates that the audio driver is not currently rendering samples,
* although it's valid and can be resumed.
*
* Usually set when RetroArch needs to simulate audio output
* without actually rendering samples (e.g. runahead),
* or when reinitializing the driver.
*
* Samples will still be accepted, but they will be silently dropped.
*/
AUDIO_FLAG_SUSPENDED = (1 << 2),

/**
* Indicates that the audio mixer is available
* and can mix one or more audio streams.
*
* Will not be set if RetroArch was built without \c HAVE_AUDIOMIXER.
*/
AUDIO_FLAG_MIXER_ACTIVE = (1 << 3),

/**
* Indicates that the frontend will never need audio from the core,
* usually when runahead is active.
*
* When set, any audio received by the core will not be processed.
*
* Will not be set if RetroArch was built without \c HAVE_RUNAHEAD.
*
* @see RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE
*/
AUDIO_FLAG_HARD_DISABLE = (1 << 4),

/**
* Indicates that audio rate control is enabled.
* This means that the audio system will adjust the rate at which
* it sends samples to the driver,
* minimizing the occurrences of buffer overrun or underrun.
*
* @see audio_driver_t::write_avail
* @see audio_driver_t::buffer_size
*/
AUDIO_FLAG_CONTROL = (1 << 5)
};


typedef struct audio_statistics
{
unsigned samples;
Expand Down
Loading