seal 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/README.md +1 -1
  2. data/include/seal/buf.h +13 -8
  3. data/include/seal/core.h +1 -5
  4. data/include/seal/efs.h +22 -22
  5. data/include/seal/err.h +3 -8
  6. data/include/seal/fmt.h +1 -6
  7. data/include/seal/listener.h +7 -6
  8. data/include/seal/raw.h +2 -6
  9. data/include/seal/rvb.h +12 -6
  10. data/include/seal/src.h +27 -10
  11. data/include/seal/stream.h +12 -5
  12. data/mpg123/build/config.guess +0 -0
  13. data/mpg123/build/config.sub +0 -0
  14. data/mpg123/build/depcomp +0 -0
  15. data/mpg123/build/install-sh +0 -0
  16. data/mpg123/build/missing +0 -0
  17. data/mpg123/configure +0 -0
  18. data/mpg123/ports/MSVC++/2010/libmpg123/libmpg123.vcxproj +5 -0
  19. data/mpg123/ports/MSVC++/2010/libmpg123/yasm.exe +0 -0
  20. data/mpg123/scripts/benchmark-cpu.pl +0 -0
  21. data/mpg123/src/win32_net.c +0 -0
  22. data/mpg123/src/win32_support.c +0 -0
  23. data/mpg123/src/win32_support.h +0 -0
  24. data/mpg123/windows-builds.sh +0 -0
  25. data/spec/seal/core_spec.rb +1 -1
  26. data/spec/seal/effect_slot_spec.rb +5 -8
  27. data/spec/seal/reverb_spec.rb +10 -9
  28. data/spec/seal/source_spec.rb +23 -10
  29. data/spec/seal/stream_spec.rb +7 -0
  30. data/spec/spec_helper.rb +2 -1
  31. data/spec/support/boolean_reader_aliases.rb +9 -0
  32. data/src/rubyext.c +115 -67
  33. data/src/seal/buf.c +0 -6
  34. data/src/seal/core.c +1 -7
  35. data/src/seal/efs.c +0 -9
  36. data/src/seal/err.c +0 -6
  37. data/src/seal/fmt.c +0 -6
  38. data/src/seal/listener.c +0 -6
  39. data/src/seal/mpg.c +0 -6
  40. data/src/seal/mpg.h +0 -4
  41. data/src/seal/ov.c +0 -6
  42. data/src/seal/ov.h +1 -5
  43. data/src/seal/raw.c +0 -6
  44. data/src/seal/reader.c +4 -11
  45. data/src/seal/reader.h +1 -5
  46. data/src/seal/src.c +9 -6
  47. data/src/seal/stream.c +0 -6
  48. data/src/seal/threading.c +0 -6
  49. data/src/seal/threading.h +1 -6
  50. data/src/seal/wav.c +1 -8
  51. data/src/seal/wav.h +2 -6
  52. metadata +5 -3
  53. data/src/win32api.rb +0 -29
@@ -1,9 +1,3 @@
1
- /*
2
- * mpg.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #include <stdio.h>
8
2
  #include <stddef.h>
9
3
  #include <mpg123/mpg123.h>
@@ -1,8 +1,4 @@
1
1
  /*
2
- * mpg.h is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- *
6
2
  * mpg.h provides subroutines to decode MPEG 1.0, 2.0 and 2.5 audio for layers
7
3
  * 1, 2 and 3.
8
4
  */
@@ -1,9 +1,3 @@
1
- /*
2
- * ov.c is part of the Scorched End Audio Library (SEAL) and is
3
- * licensed under the terms of the GNU Lesser General Public License. See
4
- * COPYING attached with the library.
5
- */
6
-
7
1
  #include <stdlib.h>
8
2
  #include <vorbis/codec.h>
9
3
  #define OV_EXCLUDE_STATIC_CALLBACKS
@@ -1,9 +1,5 @@
1
1
  /*
2
- * ov.h is part of the Scorched End Audio Library (SEAL) and is licensed under
3
- * the terms of the GNU Lesser General Public License. See COPYING attached
4
- * with the library.
5
- *
6
- * ov.h provides subroutines to decode ogg vorbis files.
2
+ * Interfaces to decode ogg vorbis files.
7
3
  */
8
4
 
9
5
  #ifndef _SEAL_OV_H_
@@ -1,9 +1,3 @@
1
- /*
2
- * raw.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #include <stdlib.h>
8
2
  #include <stddef.h>
9
3
  #include <seal/raw.h>
@@ -1,9 +1,3 @@
1
- /*
2
- * reader.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #ifdef _WIN32
8
2
  # include <Windows.h>
9
3
  #endif
@@ -61,9 +55,9 @@ _seal_fclose(FILE* file)
61
55
  */
62
56
  #define READ_UINT_LE(nbits, buf, size, file) do \
63
57
  { \
64
- size_t _i_, count; \
58
+ size_t _i_; \
65
59
  \
66
- count = fread((buf), sizeof (uint##nbits##_t), (size), (file)); \
60
+ fread((buf), sizeof (uint##nbits##_t), (size), (file)); \
67
61
  for (_i_ = 0; _i_ < (size); ++_i_) { \
68
62
  *(buf) = raw2le##nbits((uint8_t*) (buf)); \
69
63
  ++(buf); \
@@ -90,13 +84,12 @@ _seal_read_uint32le(uint32_t* buf, size_t size, void* file)
90
84
  void
91
85
  _seal_skip(uint32_t nbytes, void* file)
92
86
  {
93
- size_t count;
94
87
  uint32_t i;
95
88
  static uint8_t junk[JUNK_BUF_SIZE];
96
89
 
97
90
  for (i = JUNK_BUF_SIZE; i <= nbytes; i += JUNK_BUF_SIZE)
98
- count = fread(junk, 1, JUNK_BUF_SIZE, file);
91
+ fread(junk, 1, JUNK_BUF_SIZE, file);
99
92
  nbytes %= JUNK_BUF_SIZE;
100
93
  if (nbytes > 0)
101
- count = fread(junk, 1, nbytes, file);
94
+ fread(junk, 1, nbytes, file);
102
95
  }
@@ -1,9 +1,5 @@
1
1
  /*
2
- * reader.h is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- *
6
- * reader.h provides utilities related to file input.
2
+ * Utilities related to file input.
7
3
  */
8
4
 
9
5
  #ifndef _SEAL_READER_H_
@@ -1,9 +1,3 @@
1
- /*
2
- * src.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #include <string.h>
8
2
  #include <stdlib.h>
9
3
  #include <al/al.h>
@@ -366,6 +360,15 @@ seal_set_src_stream(seal_src_t* src, seal_stream_t* stream)
366
360
  return seal_update_src(src);
367
361
  }
368
362
 
363
+ seal_err_t
364
+ seal_feed_efs(seal_src_t* src, seal_efs_t* slot, int index)
365
+ {
366
+ alSource3i(src->id, AL_AUXILIARY_SEND_FILTER, slot->id, index,
367
+ AL_FILTER_NULL);
368
+
369
+ return _seal_get_openal_err();
370
+ }
371
+
369
372
  seal_err_t
370
373
  seal_update_src(seal_src_t* src)
371
374
  {
@@ -1,9 +1,3 @@
1
- /*
2
- * stream.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #include <stddef.h>
8
2
  #include <seal/stream.h>
9
3
  #include <seal/raw.h>
@@ -1,9 +1,3 @@
1
- /*
2
- * threading.c is part of the Scorched End Audio Library (SEAL) and is
3
- * licensed under the terms of the GNU Lesser General Public License. See
4
- * COPYING attached with the library.
5
- */
6
-
7
1
  #include <stdlib.h>
8
2
  #include <stdint.h>
9
3
  #include "threading.h"
@@ -1,10 +1,5 @@
1
1
  /*
2
- * threading.h is part of the Scorched End Audio Library (SEAL) and is
3
- * licensed under the terms of the GNU Lesser General Public License.
4
- * See COPYING attached with the library.
5
- *
6
- * threading.h is an abstraction layer for thread-related operations, which
7
- * ensures Seal's thread-safety.
2
+ * An abstraction layer for thread-related operations.
8
3
  */
9
4
 
10
5
  #ifndef _SEAL_THREADING_H_
@@ -1,9 +1,3 @@
1
- /*
2
- * wav.c is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- */
6
-
7
1
  #include <stdlib.h>
8
2
  #include <stdio.h>
9
3
  #include <seal/raw.h>
@@ -84,13 +78,12 @@ static
84
78
  seal_err_t
85
79
  read_data(seal_raw_t* raw, uint32_t chunk_size, FILE* wav)
86
80
  {
87
- size_t count;
88
81
  seal_err_t err;
89
82
 
90
83
  if ((err = seal_alloc_raw_data(raw, chunk_size)) != SEAL_OK)
91
84
  return err;
92
85
 
93
- count = fread(raw->data, 1, chunk_size, wav);
86
+ fread(raw->data, 1, chunk_size, wav);
94
87
 
95
88
  return SEAL_OK;
96
89
  }
@@ -1,10 +1,6 @@
1
1
  /*
2
- * wav.h is part of the Scorched End Audio Library (SEAL) and is licensed
3
- * under the terms of the GNU Lesser General Public License. See COPYING
4
- * attached with the library.
5
- *
6
- * wav.h provides subroutines to decode WAVE audio files. Currently only
7
- * uncompressed waveform data with no more than 16-bit depth are supported.
2
+ * Interfaces to decode WAVE audio files. Currently only uncompressed waveform
3
+ * data with no more than 16-bit depth are supported.
8
4
  */
9
5
 
10
6
  #ifndef _SEAL_WAV_H_
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-18 00:00:00.000000000 Z
12
+ date: 2012-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler
@@ -454,6 +454,7 @@ files:
454
454
  - spec/spec_helper.rb
455
455
  - spec/support/attribute_examples.rb
456
456
  - spec/support/audio_object_with_format.rb
457
+ - spec/support/boolean_reader_aliases.rb
457
458
  - spec/support/movable_object.rb
458
459
  - src/libogg/bitwise.c
459
460
  - src/libogg/framing.c
@@ -517,7 +518,6 @@ files:
517
518
  - src/seal/threading.h
518
519
  - src/seal/wav.c
519
520
  - src/seal/wav.h
520
- - src/win32api.rb
521
521
  - LICENSE
522
522
  - README.md
523
523
  - .yardopts
@@ -560,4 +560,6 @@ test_files:
560
560
  - spec/spec_helper.rb
561
561
  - spec/support/attribute_examples.rb
562
562
  - spec/support/audio_object_with_format.rb
563
+ - spec/support/boolean_reader_aliases.rb
563
564
  - spec/support/movable_object.rb
565
+ has_rdoc: yard
@@ -1,29 +0,0 @@
1
- # Require this script to bind SEAL through Win32API.
2
- # This is a fallback solution just in case Ruby API and DL are unavailable.
3
- # Performance-wise, Win32API < DL < Ruby API.
4
-
5
- require 'win32api'
6
-
7
- module Seal
8
- class << self
9
- GET_ERR_MSG = Win32API.new('seal', 'seal_get_err_msg', 'i', 'p')
10
- STARTUP = Win32API.new('seal', 'seal_startup', 'p', 'i')
11
- CLEANUP = Win32API.new('seal', 'seal_cleanup', 'v', 'v')
12
-
13
- def check_error(error_code)
14
- raise SealError, GET_ERR_MSG.call(error_code) if error_code != 0
15
- nil
16
- end
17
-
18
- def startup(device = nil)
19
- check_error(STARTUP.call(device))
20
- end
21
-
22
- def cleanup
23
- CLEANUP.call
24
- end
25
- end
26
-
27
- class SealError < Exception
28
- end
29
- end