diff options
author | Jeremy White <jwhite@codeweavers.com> | 2013-11-30 09:19:47 -0600 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2014-01-02 12:39:04 +0100 |
commit | 530888ad900421ddbf43154fe0f9b916e7cde3c7 (patch) | |
tree | 6dc32cd8eab55663dd28f988f3ef7cf407e4fbce /client/windows | |
parent | ce9b714137a767b81f2d3c40b5f3ce0d5cf70fc8 (diff) | |
download | spice-530888ad900421ddbf43154fe0f9b916e7cde3c7.tar.gz spice-530888ad900421ddbf43154fe0f9b916e7cde3c7.tar.xz spice-530888ad900421ddbf43154fe0f9b916e7cde3c7.zip |
Fix typo; sampel --> sample
Signed-off-by: Jeremy White <jwhite@codeweavers.com>
Diffstat (limited to 'client/windows')
-rw-r--r-- | client/windows/platform.cpp | 8 | ||||
-rw-r--r-- | client/windows/playback.cpp | 14 | ||||
-rw-r--r-- | client/windows/playback.h | 4 | ||||
-rw-r--r-- | client/windows/record.cpp | 12 | ||||
-rw-r--r-- | client/windows/record.h | 4 |
5 files changed, 21 insertions, 21 deletions
diff --git a/client/windows/platform.cpp b/client/windows/platform.cpp index d3417e39..fc51a12d 100644 --- a/client/windows/platform.cpp +++ b/client/windows/platform.cpp @@ -640,18 +640,18 @@ void Platform::set_process_loop(ProcessLoop& main_process_loop) } WaveRecordAbstract* Platform::create_recorder(RecordClient& client, - uint32_t sampels_per_sec, + uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels) { - return new WaveRecorder(client, sampels_per_sec, bits_per_sample, channels); + return new WaveRecorder(client, samples_per_sec, bits_per_sample, channels); } -WavePlaybackAbstract* Platform::create_player(uint32_t sampels_per_sec, +WavePlaybackAbstract* Platform::create_player(uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels) { - return new WavePlayer(sampels_per_sec, bits_per_sample, channels); + return new WavePlayer(samples_per_sec, bits_per_sample, channels); } static void toggle_modifier(int key) diff --git a/client/windows/playback.cpp b/client/windows/playback.cpp index 41b92bc1..87ed26a0 100644 --- a/client/windows/playback.cpp +++ b/client/windows/playback.cpp @@ -29,9 +29,9 @@ #define LOW_MARK_MS 40 -WavePlayer::WavePlayer(uint32_t sampels_per_sec, uint32_t bits_per_sample, uint32_t channels) +WavePlayer::WavePlayer(uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels) : _wave_out (NULL) - , _sampels_per_ms (sampels_per_sec / 1000) + , _samples_per_ms (samples_per_sec / 1000) , _ring (NULL) , _head (0) , _in_use (0) @@ -42,9 +42,9 @@ WavePlayer::WavePlayer(uint32_t sampels_per_sec, uint32_t bits_per_sample, uint3 info.wFormatTag = WAVE_FORMAT_PCM; info.nChannels = channels; - info.nSamplesPerSec = sampels_per_sec; + info.nSamplesPerSec = samples_per_sec; sample_bytes = info.nBlockAlign = channels * bits_per_sample / 8; - info.nAvgBytesPerSec = sampels_per_sec * info.nBlockAlign; + info.nAvgBytesPerSec = samples_per_sec * info.nBlockAlign; info.wBitsPerSample = bits_per_sample; if (waveOutOpen(&_wave_out, WAVE_MAPPER, &info, 0, 0, CALLBACK_NULL) @@ -53,8 +53,8 @@ WavePlayer::WavePlayer(uint32_t sampels_per_sec, uint32_t bits_per_sample, uint3 } int frame_size = WavePlaybackAbstract::FRAME_SIZE; - _ring_size = (sampels_per_sec * RING_SIZE_MS / 1000) / frame_size; - _start_mark = (sampels_per_sec * START_MARK_MS / 1000) / frame_size; + _ring_size = (samples_per_sec * RING_SIZE_MS / 1000) / frame_size; + _start_mark = (samples_per_sec * START_MARK_MS / 1000) / frame_size; _frame_bytes = frame_size * channels * bits_per_sample / 8; _ring_item_size = sizeof(WAVEHDR) + _frame_bytes + sample_bytes; @@ -174,5 +174,5 @@ bool WavePlayer::abort() uint32_t WavePlayer::get_delay_ms() { - return _in_use * WavePlaybackAbstract::FRAME_SIZE / _sampels_per_ms; + return _in_use * WavePlaybackAbstract::FRAME_SIZE / _samples_per_ms; } diff --git a/client/windows/playback.h b/client/windows/playback.h index 6f70a7b4..6493eff4 100644 --- a/client/windows/playback.h +++ b/client/windows/playback.h @@ -22,7 +22,7 @@ class WavePlayer: public WavePlaybackAbstract { public: - WavePlayer(uint32_t sampels_per_sec, uint32_t bits_per_sample, uint32_t channels); + WavePlayer(uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels); virtual ~WavePlayer(); virtual bool write(uint8_t* frame); @@ -40,7 +40,7 @@ private: private: HWAVEOUT _wave_out; - uint32_t _sampels_per_ms; + uint32_t _samples_per_ms; uint32_t _frame_bytes; uint32_t _start_mark; uint32_t _ring_item_size; diff --git a/client/windows/record.cpp b/client/windows/record.cpp index 0736b113..a2e5f393 100644 --- a/client/windows/record.cpp +++ b/client/windows/record.cpp @@ -32,7 +32,7 @@ static void CALLBACK in_proc(HWAVEIN handle, UINT msg, DWORD user_data, DWORD pa recorder->trigger(); } -WaveRecorder::WaveRecorder(Platform::RecordClient& client, uint32_t sampels_per_sec, +WaveRecorder::WaveRecorder(Platform::RecordClient& client, uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels) : _client (client) , _ring (NULL) @@ -45,9 +45,9 @@ WaveRecorder::WaveRecorder(Platform::RecordClient& client, uint32_t sampels_per_ info.wFormatTag = WAVE_FORMAT_PCM; info.nChannels = channels; - info.nSamplesPerSec = sampels_per_sec; + info.nSamplesPerSec = samples_per_sec; info.nBlockAlign = frame_align = channels * bits_per_sample / 8; - info.nAvgBytesPerSec = sampels_per_sec * info.nBlockAlign; + info.nAvgBytesPerSec = samples_per_sec * info.nBlockAlign; info.wBitsPerSample = bits_per_sample; @@ -63,7 +63,7 @@ WaveRecorder::WaveRecorder(Platform::RecordClient& client, uint32_t sampels_per_ _frame = new uint8_t[frame_bytes]; _frame_pos = _frame; _frame_end = _frame + frame_bytes; - init_ring(sampels_per_sec, frame_bytes, frame_align); + init_ring(samples_per_sec, frame_bytes, frame_align); _client.add_event_source(*this); } catch (...) { delete[] _ring; @@ -83,11 +83,11 @@ WaveRecorder::~WaveRecorder() delete[] _frame; } -void WaveRecorder::init_ring(uint32_t sampels_per_sec, uint32_t frame_bytes, uint32_t frame_align) +void WaveRecorder::init_ring(uint32_t samples_per_sec, uint32_t frame_bytes, uint32_t frame_align) { const int frame_size = WavePlaybackAbstract::FRAME_SIZE; - _ring_size = (sampels_per_sec * RING_SIZE_MS / 1000) / frame_size; + _ring_size = (samples_per_sec * RING_SIZE_MS / 1000) / frame_size; _ring_item_size = sizeof(WAVEHDR) + frame_bytes + frame_align; int ring_bytes = _ring_size * _ring_item_size; diff --git a/client/windows/record.h b/client/windows/record.h index 4071af4f..73264197 100644 --- a/client/windows/record.h +++ b/client/windows/record.h @@ -23,7 +23,7 @@ class WaveRecorder: public WaveRecordAbstract, public EventSources::Trigger { public: - WaveRecorder(Platform::RecordClient& client, uint32_t sampels_per_sec, + WaveRecorder(Platform::RecordClient& client, uint32_t samples_per_sec, uint32_t bits_per_sample, uint32_t channels); virtual ~WaveRecorder(); @@ -34,7 +34,7 @@ public: virtual void on_event(); private: - void init_ring(uint32_t sampels_per_sec, uint32_t frame_bytes, uint32_t frame_align); + void init_ring(uint32_t samples_per_sec, uint32_t frame_bytes, uint32_t frame_align); WAVEHDR* wave_hader(uint32_t position); void move_head(); |