Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology
Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered
You are not logged in.
I have a sound named incomingsound.ogg in the tests folder in the Openspace3d folder. I'd like to be able to play the sound (as part of a chat ui, not as a sound in a 3d scene)
this isn't working:
typeof audio = AsSnd;;
///
fun blahblah()=
set audio = asSndCreate _channel nil;
asSndLoad audio "tests/incomingsound.ogg" AS_SND_STATIC;
asSndPlay audio nil;;
os3d console is telling me:
asSndLoad audio "tests/incomingsound.ogg" AS_SND_STATIC??;
syntax error
>>> ERROR - Type mismatch (detail):
Found: [AsSnd S I]
Expected: [AsSnd P I]
if I try:
set audio = asSndCreate _channel nil;
let "tests/incomingsound.ogg"-> soundpath in
(
asSndLoad audio soundpath AS_SND_STATIC;
asSndPlay audio nil;
);
the os3d console says:
>>> ERROR - Type mismatch (detail):
Found: [S P AsSnd]
Expected: [S S u0]
any input welcome
thx!
-h
Offline
Hi !
asSound is a deprecated sound API (used in the old 3D engine) and don't support ogg format
use http://redmine.scolring.org/projects/au … audio.html instead.
see the example in os3dplugins\media\sound\csound.pkg
when the function take a path as a P type, this mean a scol file in partition, to get it use _checkpack "my/path..."
asSndLoad audio (_checkpack "tests/incomingsound.ogg") AS_SND_STATIC;
Offline
For info, the new API is in the classical documentation : http://www.scolring.org/files/doc_html/ … audio.html
For security reasons and other things, Scol can read (respectively write) only in a Scol partition : a predefined directory and its sub-directory. When you must read (write) a file, you must set a read (write) reference file given by _checkpack (_getmodifypack) :
http://www.scolring.org/files/doc_html/_checkpack.html
http://www.scolring.org/files/doc_html/ … ypack.html
If the given path name is not found (or not accessible for Scol), these functions return nil. You can check that too.
Offline
Thx for your replies Is auaudio what I should use for non 3d sounds, like sounds that are part of a 2d ui?
Offline
You'll find an example in the doc for a 2d use : http://www.scolring.org/files/doc_html/ … audio.html (at the bottom of the page)
Offline
You'll find an example in the doc for a 2d use : http://www.scolring.org/files/doc_html/ … audio.html (at the bottom of the page)
thx, I think I have everything I need to know now.
Offline
I updated my chat project with sounds triggered by incoming messages, I'll leave my browser open, come for a visit. I'm working now but I have time to reply to an incoming waahwaah sound:
http://www.ifam.net/openspace/remote_bo … index.html
Last edited by hebdemnobad (9-Jan-2014 15:23:44)
Offline