jack1 codebase
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.

45 lines
1.4KB

  1. /*
  2. * Copyright (C) 2004 Rui Nuno Capela, Steve Harris
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License as published by
  6. * the Free Software Foundation; either version 2.1 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. *
  18. * $Id$
  19. */
  20. #ifndef __jack_messagebuffer_h__
  21. #define __jack_messagebuffer_h__
  22. #define MB_BUFFERSIZE 256
  23. #define MESSAGE(fmt,args...) { \
  24. char msg[MB_BUFFERSIZE]; \
  25. snprintf(msg, MB_BUFFERSIZE-1, fmt, ##args); \
  26. jack_messagebuffer_add(msg); \
  27. }
  28. #define VERBOSE(engine,fmt,args...) \
  29. if ((engine)->verbose) { \
  30. char msg[MB_BUFFERSIZE]; \
  31. snprintf(msg, MB_BUFFERSIZE-1, fmt, ##args); \
  32. jack_messagebuffer_add(msg); \
  33. }
  34. void jack_messagebuffer_init();
  35. void jack_messagebuffer_exit();
  36. void jack_messagebuffer_add(const char *msg);
  37. #endif /* __jack_messagebuffer_h__ */