About audio output(StelAudioMgr) #3360
-
Hi Everybody, Is ”StelAudioMgr" working with Stellarium 23.1 ? The script AudioTest.ssc is written as under:
But this cannot play sound. The folder structure is below.
Any help or advice would be much appreciated. Fuyuko |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 17 replies
-
I just ran the audiotest script in 23.2. The OGG is missing, WAV and MP3 play well. In master, OGG plays but WAV sounds bad. Two suggestions, not sure if any applies here:
Looking again, it seems the path is likely a problem. the Audio files must reside in the script directory or a subdirectory of that. |
Beta Was this translation helpful? Give feedback.
-
Hi, I moved mp3 from "C:\Program Files (x86)\Stellarium\work" to "C:\Users\Fuyuko\AppData\Roaming\Stellarium\work"
But this cannot play sound.
But this cannot play sound either. Neighing_horse.mp3 can play with Windows Media Player. Do I need any plugins to use "StelAudioMgr"? Any other ideas for playing audio? Many thanks |
Beta Was this translation helpful? Give feedback.
-
Please use relative paths for sounds |
Beta Was this translation helpful? Give feedback.
-
Absolute path names are forbidden for reasons of security. If that does not work, try our officially supported call by the core object which we use in our audiotest.ssc: core.loadSound("work/Neighing_horse.mp3", "Horse");
You did it again. Don't put your stuff into the program directory.
No.
Check the logfile for any error messages. |
Beta Was this translation helpful? Give feedback.
-
Thank you @gzotti I have tried replacing the Neighing_horse.mp3 with the below file I also modified the script to use "core.loadSound". Then audiotest.mp3 could play sound! Thank you so much for the answers! |
Beta Was this translation helpful? Give feedback.
-
Please may I ask the same question as @Fuyuko-SFA to @gzotti and / or @alex-w : but for Stellarium 23.3 running on macOS 14.1.2 Is StelAudioMgr functional in Stellarium 23.3? I have placed my audio file in: /Users/Me/Library/Application Support/Stellarium/scripts/audio/Polorum.mp3 ALSO in: /Users/Me/Library/Application Support/Stellarium/scripts/Polorum.mp3 ALSO in: /Applications/Stellarium.app/Contents/Resources/scripts/audio/Polorum.mp3 I have tried to load this audio file - both via the Script Console and a script file - using each of the following commands: StelAudioMgr.loadSound("Me/Library/Application Support/Stellarium/scripts/audio/Polorum.mp3","Chant"); coreloadSound("Me/Library/Application Support/Stellarium/scripts/audio/Polorum.mp3","Chant"); Yet none of them work. The same error is always returned: script error: 'Reference' @ line 1: ReferenceError: StelAudioMgr is not defined Can someone please help / advise? Thanks very much Mario |
Beta Was this translation helpful? Give feedback.
-
Blimey, not sure why I used core.loadSound() incorrectly (!!) Now it loads with core.loadSound I assume I will now run: core.playSound("Chant") |
Beta Was this translation helpful? Give feedback.
-
Cool, it accepts: core.playSound("Chant") Yet I can't hear anything. Is there a volume command I need maybe? |
Beta Was this translation helpful? Give feedback.
-
Yes the file plays with other players. It's OK, I will try different audio files, and will let you know. At least now the load command is working! THANK YOU guys! 😃 |
Beta Was this translation helpful? Give feedback.
-
IT WORKS!!!! I have literally been waiting for YEARS for this functionality!! 😁 🤩 🥳 |
Beta Was this translation helpful? Give feedback.
-
I have (re)-activated this in 2016 for an exhibition project... Enjoy! |
Beta Was this translation helpful? Give feedback.
-
The biggest problem I am facing now (with v23.3 and a brand new MacBook Pro M3), is the sky motion is not smooth, but jerky. I am currently researching this, and will be posting to this thread later: #2947 (in case someone can give me advice on how to improve the performance) |
Beta Was this translation helpful? Give feedback.
Absolute path names are forbidden for reasons of security.
Place the MP3 into C:\Users\Fuyuko\AppData\Roaming\Stellarium\scripts\work, then try
StelAudioMgr.loadSound("work/Neighing_horse.mp3", "Horse");
If that does not work, try our officially supported call by the core object which we use in our audiotest.ssc:
core.loadSound("work/Neighing_horse.mp3", "Horse");