Giter VIP home page Giter VIP logo

Comments (7)

guerman5 avatar guerman5 commented on August 24, 2024 1

+1
I'm also interested.
I dug the issues and found an old post from Sir Pohl (when snapcast was only v13)
badaix/snapcast#271 (comment)

Then, I tried to cross compile v13 snapcast client/server for android on Arch, got the NDK, compiled the tools and the submodules (had to find myself). but i get stuck with the boost submodule, probably is not exactly as it was prepared for snapcast use. I downloaded boost_asio_1_10_8.zip from sourceforge and boost_1_63_0.zip from boost . org trying to get 2016 code, and tried to stitch all the hpp that compiler was asking. But get errors like:
client
./clientConnection.h:34:7: error: use of undeclared identifier 'asio'; did you mean 'boost::asio'?

server
controlSession.h:34:7: error: 'asio' has not been declared
snapServer.cpp:65:51: error: expected primary-expression before '>' token /*auto portValue =*/ op.add<Value<size_t>>("p", "port", "Server port", settings.port, &settings.port);

among others errors and warnings, but i guess they originate from same mistake.

I'm doing something wrong, definitely obvious for the experienced eye, but I cant see it. Its because I'm learning how to compile with snapcast xD, never done this before.

I'm writing this to bring the topic into motion once more, and show that I'm trying as best as I can.
Snapcast is v25 now, many things have changed, i assume the compilation method will be totally different.

Yes, that good is snapcast, and that bad I want to be able to run snapserver from android. I've taken the jump into compiling.

Thanks for reading.

from snapdroid.

guerman5 avatar guerman5 commented on August 24, 2024 1

The build was successful, apk installed ok. Configured settings and took off
Im testing it now, very smooth

/data/app/de.badaix.snapcast-1/lib/arm64/./libsnapserver.so --server.datadir=/storage/emulated/0 --stream.source=pipe:///data/data/com.termux/files/usr/var/run/mpd.fifo?name=Radio&sampleformat=48000:16:2&codec=flac

What a great satisfaction it feels, its alive!

Muchas gracias Johannes

from snapdroid.

badaix avatar badaix commented on August 24, 2024

The develop branch can compile the server for Android. To build the App, I recommend to use the latest Android Studio with the latest NDK and SDK and copy the required libraries to Snapcast/libs as described in readme.txt. To build the server, BUILD_SERVER must be set to ON in build.gradle.
You can test the server in a root shell of your emulator:

johannes@Laptop:~/Develop/snapdroid$ ~/Develop/Android/Sdk/platform-tools/adb shell
generic_x86:/ $ su
generic_x86:/ # find /data -name "libsnapserver.so"
/data/app/~~eKwnv13JzR3hJVqyZWj3wQ==/de.badaix.snapcast-YFPjscovXwt_pmCMncsb6A==/lib/x86/libsnapserver.so
generic_x86:/ # /data/app/~~eKwnv13JzR3hJVqyZWj3wQ==/de.badaix.snapcast-YFPjscovXwt_pmCMncsb6A==/lib/x86/libsnapserver.so
2021-11-06 12-11-30.566 [Info] (Snapserver) Version 0.25.0
2021-11-06 12-11-30.579 [Error] (Snapserver) Exception: failed to create settings directory: "//.config/snapserver/": 30
terminating with uncaught exception of type SnapException: failed to create settings directory: "//.config/snapserver/": 30
/buildbot/src/android/ndk-release-r23/toolchain/llvm-project/libcxx/../../../toolchain/llvm-project/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type SnapException: failed to create settings directory: "//.config/snapserver/": 30" failed
Aborted 
134|generic_x86:/ # 

As you can see, this server will fail to create a directory for it's settings and exit.

from snapdroid.

badaix avatar badaix commented on August 24, 2024

The settings directory is now configurable. You can start the server from the App in a similar way as the client is started and configure a data dir and a stream source like this:
libsnapserver.so --server.datadir=getCacheDir().toString() --stream.source=tcp://127.0.0.1?name=android

from snapdroid.

guerman5 avatar guerman5 commented on August 24, 2024

Thanks a lot, I will work on it and update. Sweet!

from snapdroid.

pvi-github avatar pvi-github commented on August 24, 2024

Hello there,

Do we still need to have the device rooted to run the Snapcast server on android ?

Kind regards,

from snapdroid.

pvi-github avatar pvi-github commented on August 24, 2024

And bonus question : wouldn't it be nice to have an APK published for Snapcast server ?

from snapdroid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.