Audio-AMaMP

 view release on metacpan or  search on metacpan

amamp_binding/amamp_binding.c  view on Meta::CPAN

#endif

		/* Free buffer and the core structure itself. */
		if (core->messageBuffer != NULL)
			free(core->messageBuffer);
		free(core);
	}
}


/* Checks if the core is still alive. Returns zero if it is not and a non-zero value
   otherwise. */
int amampIsCoreAlive(AMAMP_CORE *core)
{
	/* If we know it's dead, return 0 right away. */
	if (core == NULL || core->coreAlive == 0)
		return 0;

	/* Otherwise, do something to check it. Go native. */
#if AMAMP_BINDING_WIN32 == 1
	/* Win32. We can simply do a peek pipe operation. */

lib/Audio/AMaMP.pm  view on Meta::CPAN

			}
		}
	}

	# Return message structure.
	$message{'parameters'} = \%params;
	return %message;
}


# This sub checks if the core is still alive/available.
sub isCoreAlive {
	# Just call C function to check.
	my ($self) = @_;
	return amampIsCoreAlive($self->{'core'});
}

1;
__END__
# Below is stub documentation for your module. You'd better edit it!

lib/Audio/AMaMP.pm  view on Meta::CPAN

will be returned in this case. If there is a message, it will be returned
in plain text. A non-zero value for block will cause the method to only
return an undefined value when an error occurs, e.g. when the core has
terminated. Otherwise it will wait until a message is available before
returning.

=item isCoreAlive

  print "Core has not terminated" if $amamp->isCoreAlive;

Checks if the AMaMP core is still "alive", e.g. if it has terminated.
If it has terminated, 0 is returned. If it is still alive, a non-zero
value is returned. Note that just because the core is no longer alive
does not mean there are no messages left to read.

=head1 SEE ALSO

AMaMP has a website at L<http://amamp.sourceforge.net/>, which has
the latest news about the AMaMP core and its bindings as well as a
great deal of documentation about using the core, including its
instruction file and IPC message specification.

Comments, suggestions, bug reports or questions about this module



( run in 1.098 second using v1.01-cache-2.11-cpan-df04353d9ac )