Skip to content

Commit

Permalink
Update to SFML 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Jul 9, 2023
1 parent 1090d19 commit 692aa22
Show file tree
Hide file tree
Showing 21 changed files with 3,112 additions and 735 deletions.
131 changes: 123 additions & 8 deletions .github/workflows/ci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions .github/workflows/ci.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:
- cron: '0 6 * * 6'

<% ubuntu, mac, windows = "Ubuntu", "macOS", "Windows" %>
<% latest_sfml = "2.5.1" %>
<% latest_sfml = "2.6.0" %>
<% homebrew = "Homebrew" %>
<% config = {os_ver: nil, sfml: latest_sfml, crystal: "latest", docker: nil, sfml_pkg: false} %>
<% matrix = [
config.merge(os: ubuntu, os_ver: "22.04", crystal: "nightly"),
config.merge(os: ubuntu, os_ver: "22.04", sfml: "2.5.1", crystal: "nightly"),
config.merge(os: ubuntu, os_ver: "22.04"),
config.merge(docker: "crystallang/crystal:0.28.0", os: ubuntu, os_ver: "16.04", sfml_pkg: true, sfml: "2.3.2", crystal: "0.28.0"),
config.merge(os: mac),
config.merge(os: mac, sfml: "2.5.1"),
config.merge(os: mac, sfml: homebrew, crystal: homebrew, sfml_pkg: true),
config.merge(os: windows, crystal: "nightly"),
] %>
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:
working-directory: ./examples
run: crystal build <%= example %>.cr
<% end %>
<% if m[:sfml].in?(latest_sfml, homebrew) %>
<% if m[:sfml].in?("2.5.1", latest_sfml, homebrew) %>
<% examples.each do |example, run| %>
<% if run.includes?(m[:os]) %>
- name: Run example "<%= example %>"
Expand Down
20 changes: 16 additions & 4 deletions docs/api/audio.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Based on https://github.com/SFML/SFML/blob/2.5.1/include/SFML/Audio
Based on https://github.com/SFML/SFML/blob/2.6.0/include/SFML/Audio

# SF::AlResource

Expand Down Expand Up @@ -240,11 +240,11 @@ this Music if they are later passed to `loop_points=()`.

## SF::Music#loop_points=(time_points)

Sets the beginning and end of the sound's looping sequence using `SF::Time`
Sets the beginning and duration of the sound's looping sequence using `SF::Time`

Loop points allow one to specify a pair of positions such that, when the music
loop_points=() allows for specifying the beginning offset and the duration of the loop such that, when the music
is enabled for looping, it will seamlessly seek to the beginning whenever it
encounters the end. Valid ranges for time_points.offset and time_points.length are
encounters the end of the duration. Valid ranges for time_points.offset and time_points.length are
[0, Dur) and (0, Dur-offset] respectively, where Dur is the value returned by `duration()`.
Note that the EOF "loop point" from the end to the beginning of the stream is still honored,
in case the caller seeks to a point after the end of the loop range. This function can be
Expand Down Expand Up @@ -1450,6 +1450,18 @@ the stream would reset its position.

*See also:* `playing_offset`

## SF::SoundStream#processing_interval=(interval)

Set the processing interval

The processing interval controls the period at which the
audio buffers are filled by calls to on_get_data. A smaller
interval may be useful for low-latency streams. Note that
the given period is only a hint and the actual period may
vary. The default processing interval is 10 ms.

* *interval* - Processing interval

## SF::SoundStream#sample_rate()

Get the stream sample rate of the stream
Expand Down
Loading

0 comments on commit 692aa22

Please sign in to comment.