Skip to content

Commit 073ab4b

Browse files
committed
Changed the default floating-point type from f64 to f32
1 parent 28bc09e commit 073ab4b

32 files changed

+588
-587
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- Renamed the excl arguments to exclude in the load and save functions
2626
- Removed the incl arguments from the load and save functions
2727
- Updated Example 9 to use new MML syntax
28+
- Changed the default floating-point type from f64 to f32
2829

2930
## 2.3.18
3031

rust/pyxel-engine/src/audio.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl Pyxel {
119119
&self,
120120
channel_index: u32,
121121
sequence: &[u32],
122-
start_sec: Option<f64>,
122+
start_sec: Option<f32>,
123123
should_loop: bool,
124124
should_resume: bool,
125125
) {
@@ -144,7 +144,7 @@ impl Pyxel {
144144
&self,
145145
channel_index: u32,
146146
sound_index: u32,
147-
start_sec: Option<f64>,
147+
start_sec: Option<f32>,
148148
should_loop: bool,
149149
should_resume: bool,
150150
) {
@@ -160,7 +160,7 @@ impl Pyxel {
160160
&mut self,
161161
channel_index: u32,
162162
code: &str,
163-
start_sec: Option<f64>,
163+
start_sec: Option<f32>,
164164
should_loop: bool,
165165
should_resume: bool,
166166
) {
@@ -169,7 +169,7 @@ impl Pyxel {
169169
.play_mml(code, start_sec, should_loop, should_resume);
170170
}
171171

172-
pub fn playm(&self, music_index: u32, start_sec: Option<f64>, should_loop: bool) {
172+
pub fn playm(&self, music_index: u32, start_sec: Option<f32>, should_loop: bool) {
173173
let num_channels = self.channels.lock().len();
174174
let musics = self.musics.lock();
175175
let music = musics[music_index as usize].lock();
@@ -197,7 +197,7 @@ impl Pyxel {
197197
}
198198
}
199199

200-
pub fn play_pos(&self, channel_index: u32) -> Option<(u32, f64)> {
200+
pub fn play_pos(&self, channel_index: u32) -> Option<(u32, f32)> {
201201
self.channels.lock()[channel_index as usize]
202202
.lock()
203203
.play_pos()

0 commit comments

Comments
 (0)