appneta/oboe-ruby — pull request #24 by pglombardo (2014-02-02 17:17:23+00:00)
Title: Sample source bitmask clips high bit

Reported by @guylancaster: https://github.com/tracelytics/oboe-ruby-heroku/issues/26

This also affects the core Ruby oboe gem.

The current SAMPLE_SOURCE_MASK allows only 2 bits for the sample source value returned by sampleRequest() (see https://github.com/tracelytics/oboe-ruby-heroku/blob/master/lib/base.rb#L20). This allows values from 0 to 3 but we are using values up to 6. This will result in the some values being reported incorrectly as follows:

OBOE_SAMPLE_RATE_SOURCE_LAST_OBOE = 4 as 0 (???)
OBOE_SAMPLE_RATE_SOURCE_DEFAULT_MISCONFIGURED = 5 as 1 (OBOE_SAMPLE_RATE_SOURCE_FILE)
OBOE_SAMPLE_RATE_SOURCE_OBOE_DEFAULT = 6 as 2 (OBOE_SAMPLE_RATE_SOURCE_DEFAULT )

Suggest that we increase this to 4 bits to allow new sources to be added.