Skip to content

Commit

Permalink
sync cute_sound.h
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyGaul committed Jun 29, 2024
1 parent 566dafc commit a8b06c0
Show file tree
Hide file tree
Showing 28 changed files with 549 additions and 137 deletions.
10 changes: 10 additions & 0 deletions docs/api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ This is a list of all functions in Cute Framework organized by categories. This
- [cf_app_mouse_exited](/app/cf_app_mouse_exited.md)
- [cf_app_mouse_inside](/app/cf_app_mouse_inside.md)
- [cf_app_power_info](/app/cf_app_power_info.md)
- [cf_app_request_attention](/app/cf_app_request_attention.md)
- [cf_app_request_attention_cancel](/app/cf_app_request_attention_cancel.md)
- [cf_app_request_attention_continuously](/app/cf_app_request_attention_continuously.md)
- [cf_app_set_canvas_size](/app/cf_app_set_canvas_size.md)
- [cf_app_set_position](/app/cf_app_set_position.md)
- [cf_app_set_size](/app/cf_app_set_size.md)
Expand Down Expand Up @@ -122,12 +125,15 @@ This is a list of all functions in Cute Framework organized by categories. This
## audio

### functions
- [cf_audio_channel_count](/audio/cf_audio_channel_count.md)
- [cf_audio_cull_duplicates](/audio/cf_audio_cull_duplicates.md)
- [cf_audio_destroy](/audio/cf_audio_destroy.md)
- [cf_audio_load_ogg](/audio/cf_audio_load_ogg.md)
- [cf_audio_load_ogg_from_memory](/audio/cf_audio_load_ogg_from_memory.md)
- [cf_audio_load_wav](/audio/cf_audio_load_wav.md)
- [cf_audio_load_wav_from_memory](/audio/cf_audio_load_wav_from_memory.md)
- [cf_audio_sample_count](/audio/cf_audio_sample_count.md)
- [cf_audio_sample_rate](/audio/cf_audio_sample_rate.md)
- [cf_audio_set_global_volume](/audio/cf_audio_set_global_volume.md)
- [cf_audio_set_pan](/audio/cf_audio_set_pan.md)
- [cf_audio_set_pause](/audio/cf_audio_set_pause.md)
Expand All @@ -153,6 +159,7 @@ This is a list of all functions in Cute Framework organized by categories. This
- [cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
- [cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
- [cf_sound_set_volume](/audio/cf_sound_set_volume.md)
- [cf_sound_stop](/audio/cf_sound_stop.md)


### structs
Expand Down Expand Up @@ -1122,8 +1129,11 @@ This is a list of all functions in Cute Framework organized by categories. This
- [cf_mouse_double_click_held](/input/cf_mouse_double_click_held.md)
- [cf_mouse_double_clicked](/input/cf_mouse_double_clicked.md)
- [cf_mouse_down](/input/cf_mouse_down.md)
- [cf_mouse_hidden](/input/cf_mouse_hidden.md)
- [cf_mouse_hide](/input/cf_mouse_hide.md)
- [cf_mouse_just_pressed](/input/cf_mouse_just_pressed.md)
- [cf_mouse_just_released](/input/cf_mouse_just_released.md)
- [cf_mouse_lock_inside_window](/input/cf_mouse_lock_inside_window.md)
- [cf_mouse_wheel_motion](/input/cf_mouse_wheel_motion.md)
- [cf_mouse_x](/input/cf_mouse_x.md)
- [cf_mouse_y](/input/cf_mouse_y.md)
Expand Down
22 changes: 22 additions & 0 deletions docs/app/cf_app_request_attention.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[](../header.md ':include')

# cf_app_request_attention

Category: [app](/api_reference?id=app)
GitHub: [cute_app.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_app.h)
---

Requests attention for the window for a brief period.

```cpp
void cf_app_request_attention();
```

## Remarks

On Windows this flashes the tab icon, and bounces the dock icon on OSX.

## Related Pages

[cf_app_request_attention_cancel](/app/cf_app_request_attention_cancel.md)
[cf_app_request_attention_continuously](/app/cf_app_request_attention_continuously.md)
18 changes: 18 additions & 0 deletions docs/app/cf_app_request_attention_cancel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[](../header.md ':include')

# cf_app_request_attention_cancel

Category: [app](/api_reference?id=app)
GitHub: [cute_app.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_app.h)
---

Cancels any previous requests for attention.

```cpp
void cf_app_request_attention_cancel();
```

## Related Pages

[cf_app_request_attention](/app/cf_app_request_attention.md)
[cf_app_request_attention_continuously](/app/cf_app_request_attention_continuously.md)
22 changes: 22 additions & 0 deletions docs/app/cf_app_request_attention_continuously.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[](../header.md ':include')

# cf_app_request_attention_continuously

Category: [app](/api_reference?id=app)
GitHub: [cute_app.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_app.h)
---

Requests attention for the window for continuously.

```cpp
void cf_app_request_attention_continuously();
```

## Remarks

On Windows this flashes the tab icon, and bounces the dock icon on OSX.

## Related Pages

[cf_app_request_attention](/app/cf_app_request_attention.md)
[cf_app_request_attention_cancel](/app/cf_app_request_attention_cancel.md)
19 changes: 19 additions & 0 deletions docs/audio/cf_audio_channel_count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[](../header.md ':include')

# cf_audio_channel_count

Category: [audio](/api_reference?id=audio)
GitHub: [cute_audio.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_audio.h)
---

Returns the channel count for a loaded audio resource.

```cpp
int cf_audio_channel_count(CF_Audio audio);
```
## Related Pages
[CF_Audio](/audio/cf_audio.md)
[cf_audio_sample_rate](/audio/cf_audio_sample_rate.md)
[cf_audio_sample_count](/audio/cf_audio_sample_count.md)
19 changes: 19 additions & 0 deletions docs/audio/cf_audio_sample_count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[](../header.md ':include')

# cf_audio_sample_count

Category: [audio](/api_reference?id=audio)
GitHub: [cute_audio.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_audio.h)
---

Returns the sample count for a loaded audio resource.

```cpp
int cf_audio_sample_count(CF_Audio audio);
```
## Related Pages
[CF_Audio](/audio/cf_audio.md)
[cf_audio_sample_rate](/audio/cf_audio_sample_rate.md)
[cf_audio_channel_count](/audio/cf_audio_channel_count.md)
19 changes: 19 additions & 0 deletions docs/audio/cf_audio_sample_rate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[](../header.md ':include')

# cf_audio_sample_rate

Category: [audio](/api_reference?id=audio)
GitHub: [cute_audio.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_audio.h)
---

Returns the sample rate for a loaded audio resource.

```cpp
int cf_audio_sample_rate(CF_Audio audio);
```
## Related Pages
[CF_Audio](/audio/cf_audio.md)
[cf_audio_channel_count](/audio/cf_audio_channel_count.md)
[cf_audio_sample_count](/audio/cf_audio_sample_count.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_play_sound.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Returns a playing sound [CF_Sound](/audio/cf_sound.md).
[CF_SoundParams](/audio/cf_soundparams.md)
[CF_Sound](/audio/cf_sound.md)
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
Expand All @@ -35,3 +35,4 @@ Returns a playing sound [CF_Sound](/audio/cf_sound.md).
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ An opaque pointer representing a sound created by [cf_play_sound](/audio/cf_play
## Related Pages

[CF_SoundParams](/audio/cf_soundparams.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
Expand All @@ -22,3 +22,4 @@ An opaque pointer representing a sound created by [cf_play_sound](/audio/cf_play
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_get_is_looped.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ You can set a sound to looped with [cf_sound_set_is_looped](/audio/cf_sound_set_
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_get_is_paused.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ You can set a sound to paused with [cf_sound_set_is_paused](/audio/cf_sound_set_
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_get_sample_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ can turn on/off different instruments or sounds.
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_get_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ You can set a sound volume with [cf_sound_set_volume](/audio/cf_sound_set_volume
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_is_active.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ Rreturns true if the sound is active, or false if it finished playing (and was n
[CF_Sound](/audio/cf_sound.md)
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_params_defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CF_SoundParams cf_sound_params_defaults()

[CF_SoundParams](/audio/cf_soundparams.md)
[CF_Sound](/audio/cf_sound.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
Expand All @@ -26,3 +26,4 @@ CF_SoundParams cf_sound_params_defaults()
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
1 change: 1 addition & 0 deletions docs/audio/cf_sound_set_is_looped.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ You can get a sound's looped state with [cf_sound_get_is_looped](/audio/cf_sound
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_set_is_paused.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ You can get a sound's paused state with [cf_sound_get_is_paused](/audio/cf_sound
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_sound_set_sample_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ can turn on/off different instruments or sounds.
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
1 change: 1 addition & 0 deletions docs/audio/cf_sound_set_volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ You can get a sound's volume with [cf_sound_get_volume](/audio/cf_sound_get_volu
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
29 changes: 29 additions & 0 deletions docs/audio/cf_sound_stop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[](../header.md ':include')

# cf_sound_stop

Category: [audio](/api_reference?id=audio)
GitHub: [cute_audio.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_audio.h)
---

Stops the sound instance so it no longer plays.

```cpp
void cf_sound_stop(CF_Sound sound);
```
## Related Pages
[CF_SoundParams](/audio/cf_soundparams.md)
[CF_Sound](/audio/cf_sound.md)
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_play_sound](/audio/cf_play_sound.md)
[cf_sound_is_active](/audio/cf_sound_is_active.md)
[cf_sound_get_is_paused](/audio/cf_sound_get_is_paused.md)
[cf_sound_get_is_looped](/audio/cf_sound_get_is_looped.md)
[cf_sound_get_volume](/audio/cf_sound_get_volume.md)
[cf_sound_get_sample_index](/audio/cf_sound_get_sample_index.md)
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
3 changes: 2 additions & 1 deletion docs/audio/cf_soundparams.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ You can use default settings from the [cf_sound_params_defaults](/audio/cf_sound

## Related Pages

[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
[cf_sound_stop](/audio/cf_sound_stop.md)
[CF_Sound](/audio/cf_sound.md)
[cf_sound_params_defaults](/audio/cf_sound_params_defaults.md)
[cf_play_sound](/audio/cf_play_sound.md)
Expand All @@ -34,3 +34,4 @@ You can use default settings from the [cf_sound_params_defaults](/audio/cf_sound
[cf_sound_set_sample_index](/audio/cf_sound_set_sample_index.md)
[cf_sound_set_is_paused](/audio/cf_sound_set_is_paused.md)
[cf_sound_set_is_looped](/audio/cf_sound_set_is_looped.md)
[cf_sound_set_volume](/audio/cf_sound_set_volume.md)
22 changes: 22 additions & 0 deletions docs/input/cf_mouse_hidden.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[](../header.md ':include')

# cf_mouse_hidden

Category: [input](/api_reference?id=input)
GitHub: [cute_input.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_input.h)
---

Returns whether the mouse is hidden.

```cpp
bool cf_mouse_hidden();
```

## Return Value

True means hidden, false means not hidden.

## Related Pages

[cf_mouse_hide](/input/cf_mouse_hide.md)
[cf_mouse_lock_inside_window](/input/cf_mouse_lock_inside_window.md)
18 changes: 18 additions & 0 deletions docs/input/cf_mouse_hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[](../header.md ':include')

# cf_mouse_hide

Category: [input](/api_reference?id=input)
GitHub: [cute_input.h](https://github.com/RandyGaul/cute_framework/blob/master/include/cute_input.h)
---

Hides or shows the mouse.

```cpp
void cf_mouse_hide(bool true_to_hide);
```
## Related Pages
[cf_mouse_lock_inside_window](/input/cf_mouse_lock_inside_window.md)
[cf_mouse_hidden](/input/cf_mouse_hidden.md)
Loading

0 comments on commit a8b06c0

Please sign in to comment.