Platforms to show: All Mac Windows Linux Cross-Platform
The class NSSoundMBS
class NSSoundMBS
MBS REALbasic Cocoa Plugin (NSSound),
class, Cocoa, MBS REALbasic Cocoa Plugin (NSSound), class NSSoundMBS, Console safe, Plugin version: 9.4, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.
Function: The NSSound class provides a simple interface for loading and playing audio files.
Notes:
This class supports the same audio encodings and file formats that are supported by Core Audio and QuickTime.
To use this class, initialize a new instance with the desired file or audio data. You can configure assorted aspects of the audio playback, including the volume and whether the sound loops before you play it. Depending on the type of the audio data, this class may use either Core Audio or QuickTime to handle the actual playback. (Typically, it uses Core Audio to play files in the AIFF, WAVE, NeXT, SD2, AU, and MP3 formats and may use it for other formats in the future as well.) Playback occurs asynchronously so that your application can continue doing work.
You should retain NSSound objects before initiating playback or make sure you have a strong reference to them in a garbage-collected environment. Upon deallocation, a sound object stops playback of the sound (as needed) so that it can free up the corresponding audio resources. If you want to deallocate a sound object immediately after playback, assign a delegate and use the sound:didFinishPlaying: method to deallocate it.
If you want to play the system beep sound, use the NSBeep function.
Function: The NSSound class provides a simple interface for loading and playing audio files.
Notes:
This class supports the same audio encodings and file formats that are supported by Core Audio and QuickTime.
To use this class, initialize a new instance with the desired file or audio data. You can configure assorted aspects of the audio playback, including the volume and whether the sound loops before you play it. Depending on the type of the audio data, this class may use either Core Audio or QuickTime to handle the actual playback. (Typically, it uses Core Audio to play files in the AIFF, WAVE, NeXT, SD2, AU, and MP3 formats and may use it for other formats in the future as well.) Playback occurs asynchronously so that your application can continue doing work.
You should retain NSSound objects before initiating playback or make sure you have a strong reference to them in a garbage-collected environment. Upon deallocation, a sound object stops playback of the sound (as needed) so that it can free up the corresponding audio resources. If you want to deallocate a sound object immediately after playback, assign a delegate and use the sound:didFinishPlaying: method to deallocate it.
If you want to play the system beep sound, use the NSBeep function.
- property Handle as Integer
- shared method availableSounds as string()
- shared method canInitWithPasteboard as boolean
- method Constructor
- method Constructor(data as string)
- method Constructor(file as folderitem, ByReference as boolean)
- method Constructor(url as string, ByReference as boolean)
- method currentTime as double
- method duration as double
- method isPlaying as boolean
- method loops as boolean
- method name as string
- method pause as boolean
- method play as boolean
- method playbackDeviceIdentifier as string
- method resume as boolean
- method setDelegate(delegate as NSSoundDelegateMBS)
- method setName(name as string) as boolean
- shared method soundNamed(name as string) as NSSoundMBS
- shared method soundWithContentsOfFile(file as folderitem, ByReference as boolean) as NSSoundMBS
- shared method soundWithContentsOfURL(url as string, ByReference as boolean) as NSSoundMBS
- shared method soundWithData(data as string) as NSSoundMBS
- shared method soundWithPasteboard as NSSoundMBS
- method stop as boolean
- method volume as double
- method writeToPasteboard
This class has no sub classes.
Some methods using this class:
- NSSoundMBS.soundNamed(name as string) as NSSoundMBS
- NSSoundMBS.soundWithContentsOfFile(file as folderitem, ByReference as boolean) as NSSoundMBS
- NSSoundMBS.soundWithContentsOfURL(url as string, ByReference as boolean) as NSSoundMBS
- NSSoundMBS.soundWithData(data as string) as NSSoundMBS
- NSSoundMBS.soundWithPasteboard as NSSoundMBS
Some events for this class:
- NSSoundDelegateMBS.SoundFinished(s as NSSoundMBS, didFinishPlaying as boolean)
The items on this page are in the following plugins: MBS REALbasic Cocoa Plugin.
Links
MBS Filemaker Plugins - Pfarrgemeinde St. Arnulf Nickenich