Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to address issues and support NetworkServer integration #90

Open
wants to merge 6 commits into
base: improvements-1
Choose a base branch
from

Conversation

Robertsmania
Copy link

NetworkServer - establishes a bonjour listener and accepts connections from iOS clients running the companion iOS app LosslessSwitcherRemote:
https://github.com/Robertsmania/LosslessSwitcherRemote

That may understandably be too much to consider pulling into the main LosslessSwitcher project. But other changes address these issues and can be taken individually:

Show both current and detected in menu bar and dropdown #89
#89

Manual set current to detected #88
#88

Setting to toggle auto-switch #87
#87

Display Bit Depth in addition to Sample Rate #86
#86

Manual bit depth override in menu - already in 44

Build 14 still switches Bit Depth when disabled #79
#79

Manual sample rate override in menu #44
#44

Bit depth not changing #2
#2

…ts-1 branch.

Still compatible with LosslessSwitcherRemote iOS app.
receiveClientMessage now gets the size from the client and reads the data based on that to accommodate different client.maximumDatagramSize limits.
sendServerResposne now calculates the data payload size and prepends that to the ServerResponse.
New support for .toggleBitDepthDetection, .setDeviceSampleRate/.setDeviceBitDepth with ASBD formats, .setCurrentToDetected
ResponseData now includes currentBitDepth, detectedBitDepth, bitDepthDetectionEnabled, sampleRatesForCurrentBitDepth, bitDepthsForCurrentSampleRate, timeStamp
cleanupInactiveConenction now tries to cancel failed and closed connections, rather than just removing everything thats not .ready.
CodableAudioStreamBasicDescription struct for sending/receing ASBD format arrays.
ClientRequest now supports .toggleBitDepthDetection, .setDeviceSampleRate/.setDeviceBitDepth with ASBD formats.
ClientMessage now has a timeStamp.

OutputDevices - updateClient() calls where appropriate.
AppDelegate - updateBitDepthDetectionMenuItemState - just like auto switch
@vincentneo
Copy link
Owner

That may understandably be too much to consider pulling into the main LosslessSwitcher project.

While I have yet to try the remote features, I do think that this is really cool. Maybe as a v2.0?

Right now I will probably consolidate what's good and bad about all the 9 betas released, and make an actual release of v1.1 before anything else, though.

@Robertsmania
Copy link
Author

I encourage you to consolidate and move forward with what you think works the best. I've focused my effort on the iOS companion app and network server without doing much of anything for the actual frequency/bitrate detection. In my use case I predominantly leave the auto-switch off and enjoy being able to change the settings remotely.

vincentneo and others added 2 commits February 24, 2024 23:48
It appears that Xcode is incorrectly attempting to load Network.framework from PrivateFrameworks rather than regular frameworks directory
fix build bug due to private framework conflicts

The opposite happens, when the next track happens to have a lower sample rate.
<img width="252" alt="app screenshot, with new display elements for Current and Detected frequencies, Set Rate to Current and Auto Swithing toggle" src="https://user-images.githubusercontent.com/11642124/231385169-37cf4e14-ae31-4cdb-87bb-5fb66aaa263b.png">
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit odd... not sure how permanent those are. Maybe that should be commited into the repo instead?

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.

3 participants