You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OV_getSignalOutputHeader.m 916B

1234567891011121314151617181920212223242526
  1. % openvibe toolbox for Matlab
  2. % OV_getSignalOutputHeader.m
  3. % -------------------------------
  4. % Author : Laurent Bonnet (INRIA)
  5. % Date : 28/07/2011
  6. % Set the header information on a signal output.
  7. % MEANT TO BE USED IN USER SCRIPT
  8. function [errno, nb_channels, nb_samples_per_buffer, channel_names, sampling_rate] = OV_getSignalOutputHeader(box_in, output_index)
  9. if(numel(box_in.outputs{output_index}.header) == 0)
  10. nb_channels = 0;
  11. nb_samples_per_buffer = 0;
  12. channel_names = 0;
  13. sampling_rate = 0;
  14. errno = 1;
  15. else
  16. nb_channels = box_in.outputs{output_index}.header.nb_channels;
  17. nb_samples_per_buffer = box_in.outputs{output_index}.header.nb_samples_per_buffer;
  18. channel_names = box_in.outputs{output_index}.header.channel_names;
  19. sampling_rate = box_in.outputs{output_index}.header.sampling_rate;
  20. errno = 0;
  21. end
  22. end