@tags{Audio}
More...
#include <juce_AudioCDBurner.h>
◆ DiskState
| Enumerator |
|---|
| unknown | An error condition, if the device isn't responding.
|
| trayOpen | The drive is currently open.
Note that a slot-loading drive may seem to be permanently open.
|
| noDisc | The drive has no disk in it.
|
| writableDiskPresent | The drive contains a writeable disk.
|
| readOnlyDiskPresent | The drive contains a read-only disk.
|
◆ ~AudioCDBurner()
| juce::AudioCDBurner::~AudioCDBurner |
( |
| ) |
|
◆ AudioCDBurner()
| juce::AudioCDBurner::AudioCDBurner |
( |
int |
deviceIndex | ) |
|
|
private |
◆ abortBurn()
| void juce::AudioCDBurner::abortBurn |
( |
| ) |
|
◆ addAudioTrack()
| bool juce::AudioCDBurner::addAudioTrack |
( |
AudioSource * |
source, |
|
|
int |
numSamples |
|
) |
| |
Adds a track to be written.
The source passed-in here will be kept by this object, and it will be used and deleted at some point in the future, either during the burn() method or when this AudioCDBurner object is deleted. Your caller method shouldn't keep a reference to it or use it again after passing it in here.
◆ addChangeListener()
| void juce::ChangeBroadcaster::addChangeListener |
( |
ChangeListener * |
listener | ) |
|
|
inherited |
Registers a listener to receive change callbacks from this broadcaster.
Trying to add a listener that's already on the list will have no effect.
◆ burn()
Runs the burn process.
This method will block until the operation is complete.
- Parameters
-
| listener | the object to receive callbacks about progress |
| ejectDiscAfterwards | whether to eject the disk after the burn completes |
| performFakeBurnForTesting | if true, no data will actually be written to the disk |
| writeSpeed | one of the write speeds from getAvailableWriteSpeeds(), or 0 or less to mean the fastest speed. |
◆ callListeners()
| void juce::ChangeBroadcaster::callListeners |
( |
| ) |
|
|
privateinherited |
◆ dispatchPendingMessages()
| void juce::ChangeBroadcaster::dispatchPendingMessages |
( |
| ) |
|
|
inherited |
If a change message has been sent but not yet dispatched, this will call sendSynchronousChangeMessage() to make the callback immediately.
For thread-safety reasons, you must only call this method on the main message thread.
◆ findAvailableDevices()
| static StringArray juce::AudioCDBurner::findAvailableDevices |
( |
| ) |
|
|
static |
Returns a list of available optical drives.
Use openDevice() to open one of the items from this list.
◆ getAvailableWriteSpeeds()
| Array< int > juce::AudioCDBurner::getAvailableWriteSpeeds |
( |
| ) |
const |
Returns the set of possible write speeds that the device can handle.
These are as a multiple of 'normal' speed, so e.g. '24x' returns 24, etc. Note that if there's no media present in the drive, this value may be unavailable!
- See also
- setWriteSpeed, getWriteSpeed
◆ getDiskState()
| DiskState juce::AudioCDBurner::getDiskState |
( |
| ) |
const |
Returns the current status of the device.
To get informed when the drive's status changes, attach a ChangeListener to the AudioCDBurner.
◆ getNumAvailableAudioBlocks()
| int juce::AudioCDBurner::getNumAvailableAudioBlocks |
( |
| ) |
const |
Returns the number of free blocks on the disk.
There are 75 blocks per second, at 44100Hz.
◆ isDiskPresent()
| bool juce::AudioCDBurner::isDiskPresent |
( |
| ) |
const |
Returns true if there's a writable disk in the drive.
◆ openDevice()
| static AudioCDBurner * juce::AudioCDBurner::openDevice |
( |
int |
deviceIndex | ) |
|
|
static |
Tries to open one of the optical drives.
The deviceIndex is an index into the array returned by findAvailableDevices().
◆ openTray()
| bool juce::AudioCDBurner::openTray |
( |
| ) |
|
◆ removeAllChangeListeners()
| void juce::ChangeBroadcaster::removeAllChangeListeners |
( |
| ) |
|
|
inherited |
Removes all listeners from the list.
◆ removeChangeListener()
| void juce::ChangeBroadcaster::removeChangeListener |
( |
ChangeListener * |
listener | ) |
|
|
inherited |
Unregisters a listener from the list.
If the listener isn't on the list, this won't have any effect.
◆ sendChangeMessage()
| void juce::ChangeBroadcaster::sendChangeMessage |
( |
| ) |
|
|
inherited |
◆ sendSynchronousChangeMessage()
| void juce::ChangeBroadcaster::sendSynchronousChangeMessage |
( |
| ) |
|
|
inherited |
◆ setBufferUnderrunProtection()
| bool juce::AudioCDBurner::setBufferUnderrunProtection |
( |
bool |
shouldBeEnabled | ) |
|
Tries to enable or disable buffer underrun safety on devices that support it.
- Returns
- true if it's now enabled. If the device doesn't support it, this will always return false.
◆ waitUntilStateChange()
| DiskState juce::AudioCDBurner::waitUntilStateChange |
( |
int |
timeOutMilliseconds | ) |
|
Blocks the current thread until the drive's state changes, or until the timeout expires.
- Returns
- the device's new state
◆ anyListeners
| std::atomic<bool> juce::ChangeBroadcaster::anyListeners { false } |
|
privateinherited |
◆ broadcastCallback
◆ changeListeners
◆ pimpl
| std::unique_ptr<Pimpl> juce::AudioCDBurner::pimpl |
|
private |
The documentation for this class was generated from the following file: