Skip to content

Conversation

nickci2002
Copy link
Contributor

Basic functionality that separates the pad speaker channel from the rest of the audio. This does not include gui components, which need to be implemented.

@rainmakerv3
Copy link
Contributor

PR submitted to your branch for GUI

@rainmakerv3
Copy link
Contributor

        std::string port_name = port.type != OrbisAudioOutPort::PadSpk
                                    ? Config::getPadSpkOutputDevice()
                                    : Config::getMainOutputDevice();
        u32 devId;

        if (port_name == "None") {
            stream = nullptr;
            return;
        } else if (port_name == "Default Device") {
            devId = SDL_AUDIO_DEVICE_DEFAULT_RECORDING;
        } else {
            try {
                devId = static_cast<u32>(std::stoul(port_name));
            } catch (const std::exception& e) {
                LOG_ERROR(Lib_AudioOut, "Invalid audio output device: {}", port_name);
                stream = nullptr;
                return;
            }
        }
  1. first check looks like it's meant to be port.type ==

  2. default devID looks like it's meant to be SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK

  3. I think there should be a check that if the chosen device isn't connected, it falls back to default playback instead of a null stream

@nickci2002
Copy link
Contributor Author

Whoops, my bad

@nickci2002 nickci2002 requested a review from squidbus July 26, 2025 16:53
@rainmakerv3
Copy link
Contributor

thanks, the only other thing I'm not sure of is if this how to get the SDL device ID from the chosen device name

devId = static_cast(std::stoul(port_name));

@nickci2002
Copy link
Contributor Author

Oh, that code was from shadow's mic PR. If it doesn't work, just lmk.

Copy link
Collaborator

@squidbus squidbus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, two comments (also needs a rebase).

nickci2002 and others added 14 commits August 21, 2025 10:23
* fixed RetrieveNetmask for windows

* clang..
* implement V_ALIGNBYTE_B32 and V_ALIGNBIT_B32

* fix mask

* uncomment alignbit
…4-emu#3336)

Removed redundancies from CheatsPatches::onSaveButtonClicked()
…3327)

* shader_recompiler: Remove remnants of old discard

Also constant propagate conditional discard if condition is constant

* resource_tracking_pass: Rework sharp tracking for robustness

* resource_tracking_pass: Add source dominance analysis

When reachability is not enough to prune source list, check if a source dominates all other sources

* resource_tracking_pass: Fix immediate check

How did this work before

* resource_tracking_pass: Remove unused template type

* readlane_elimination_pass: Don't add phi when all args are the same

New sharp tracking exposed some bad sources coming on sampler sharps with aniso disable pattern that also were part of readlane pattern, fix tracking by removing the unnecessary phis inbetween

* resource_tracking_pass: Allow phi in disable aniso pattern

* resource_tracking_pass: Handle not valid buffer sharp and more phi in aniso pattern
* Socket support for read/write/fstat

* Sockets are now files

* Fix ssize_t for windows

* Return posix error codes in net functions
* fix patches

* fix linux?

* + mask, mask_jump32 |  - insideMetadata
…ller (shadps4-emu#3169)

* initial commit - not cleanup yet, not usable with imGUI

* Ugly solution to working with ImGUI

* Populate the default controller labels

* Add remove default button

* missing tr calls

* edit imgui flag after updating

* Refactor

* Update sirit
* New translations en_us.ts (Catalan)

* New translations en_us.ts (Norwegian Bokmal)

* New translations en_us.ts (Italian)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Portuguese, Brazilian)

* New translations en_us.ts (Serbian (Latin))

* New translations en_us.ts (Ukrainian)

* New translations en_us.ts (Russian)

* New translations en_us.ts (Chinese Simplified)

* New translations en_us.ts (Swedish)

* New translations en_us.ts (Turkish)
* Store platform-specific level in a separate variable

So the level logged in the getsockopt/setsockopt unreachable is actually useful in cases where the level is unknown.

* Define ORBIS_NET_IPPROTO_IPV6

Not implemented yet, but since it's known we might as well add it.

* Fix error codes

Our libSceNet code expects accurate ORBIS_NET_E* errors, while the sys_net code returns ORBIS_NET_ERROR_* errors.

* Remove duplicate getsockname implementation

* Use separate mutex for ReceivePacket calls

Calls to ReceivePacket shouldn't block other socket functions, and allowing them to block these functions frequently causes deadlocks in games that use multiple threads for socket behaviors.
That said, concurrent receives are still a potential issue, so the function should still have a mutex.

* Add missing error codes

* Clang

* Minor nit

Not sure why these were left separate from the rest of the net errnos

* Set __Error() in ConvertReturnErrorCode

Because the new error values are positive, the logic of "negative return is an error" doesn't work anymore. The easiest fix, while retaining corrected error values, is to just set __Error() in ConvertReturnErrorCode, and have that return -1 instead.
I also added some formatting fixes here too.

* Set errno on stubbed P2P socket error returns.

Otherwise the errno is just whatever was set by a previous failing function, which may cause issues in some games.
I used EAGAIN here since it appears to be valid for all three of these functions, but this can be changed if requested.

* Fix missed error returns

* Fix socket methods in file_system

Missed these
Copy link
Contributor Author

@nickci2002 nickci2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See updates in sdl_audio.cpp

@nickci2002 nickci2002 requested a review from squidbus August 29, 2025 16:40
@squidbus
Copy link
Collaborator

Your PR doesn't seem to be rebased right, it includes a bunch of commits from main.

@nickci2002
Copy link
Contributor Author

How do I fix the rebase issue?

@nickci2002 nickci2002 marked this pull request as draft September 8, 2025 20:51
@nickci2002
Copy link
Contributor Author

I'm moving this to a new PR. This one is too far gone...

@nickci2002
Copy link
Contributor Author

See #3607 for new pr

@nickci2002 nickci2002 closed this Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.